Skip to content

Latest commit

 

History

History
1523 lines (1069 loc) · 95.4 KB

HostsAPI.md

File metadata and controls

1523 lines (1069 loc) · 95.4 KB

\HostsAPI

All URIs are relative to http://localhost

Method HTTP request Description
HostsDelete Delete /api/2.56/hosts Delete a host
HostsGet Get /api/2.56/hosts List hosts
HostsHostGroupsDelete Delete /api/2.56/hosts/host-groups Delete a membership from a host group
HostsHostGroupsGet Get /api/2.56/hosts/host-groups List hosts that are associated with host groups
HostsHostGroupsPost Post /api/2.56/hosts/host-groups Create a membership to a host group
HostsPatch Patch /api/2.56/hosts Modify a host
HostsPerformanceBalanceGet Get /api/2.56/hosts/performance/balance List host performance balance
HostsPerformanceByArrayGet Get /api/2.56/hosts/performance/by-array List host performance data by array
HostsPerformanceGet Get /api/2.56/hosts/performance List host performance data
HostsPost Post /api/2.56/hosts Create a host and upsert tags
HostsProtectionGroupsDelete Delete /api/2.56/hosts/protection-groups Delete a host from a protection group
HostsProtectionGroupsGet Get /api/2.56/hosts/protection-groups List hosts that are members of protection groups
HostsProtectionGroupsPost Post /api/2.56/hosts/protection-groups Create a host
HostsQosGet Get /api/2.56/hosts/qos List host QoS config
HostsSpaceGet Get /api/2.56/hosts/space List host space information
HostsTagsBatchPut Put /api/2.56/hosts/tags/batch Update tags
HostsTagsDelete Delete /api/2.56/hosts/tags Delete tags
HostsTagsGet Get /api/2.56/hosts/tags List tags

HostsDelete

HostsDelete(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).Names(names).Execute()

Delete a host

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsDelete(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsDeleteRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
contextNames []string Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.
names []string Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.

Return type

(empty response body)

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

HostsGet

HostGetResponse HostsGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Destroyed(destroyed).Filter(filter).Limit(limit).Names(names).Offset(offset).Sort(sort).TotalItemCount(totalItemCount).Execute()

List hosts

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsGet(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsGet`: HostGetResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsGetRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
allowErrors bool If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. [default to false]
contextNames []string Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.
continuationToken string A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.
destroyed bool If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.
filter string Narrows down the results to only the response objects that satisfy the filter criteria.
limit int32 Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.
names []string Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
sort []string Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.
totalItemCount bool If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.

Return type

HostGetResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsHostGroupsDelete

HostsHostGroupsDelete(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).GroupNames(groupNames).MemberNames(memberNames).Execute()

Delete a membership from a host group

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsHostGroupsDelete(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsHostGroupsDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsHostGroupsDeleteRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
contextNames []string Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.
groupNames []string 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`.
memberNames []string Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.

Return type

(empty response body)

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

HostsHostGroupsGet

MemberNoIdAllGetResponse HostsHostGroupsGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Filter(filter).GroupNames(groupNames).Limit(limit).MemberNames(memberNames).Offset(offset).Sort(sort).TotalItemCount(totalItemCount).Execute()

List hosts that are associated with host groups

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsHostGroupsGet(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsHostGroupsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsHostGroupsGet`: MemberNoIdAllGetResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsHostGroupsGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsHostGroupsGetRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
allowErrors bool If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. [default to false]
contextNames []string Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.
continuationToken string A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.
filter string Narrows down the results to only the response objects that satisfy the filter criteria.
groupNames []string 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`.
limit int32 Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.
memberNames []string Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
sort []string Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.
totalItemCount bool If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.

Return type

MemberNoIdAllGetResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsHostGroupsPost

MemberNoIdAllResponse HostsHostGroupsPost(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).GroupNames(groupNames).MemberNames(memberNames).Execute()

Create a membership to a host group

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsHostGroupsPost(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsHostGroupsPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsHostGroupsPost`: MemberNoIdAllResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsHostGroupsPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsHostGroupsPostRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
contextNames []string Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.
groupNames []string 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`.
memberNames []string Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.

Return type

MemberNoIdAllResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsPatch

HostResponse HostsPatch(ctx).Host(host).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).FromMemberIds(fromMemberIds).FromMemberNames(fromMemberNames).ModifyResourceAccess(modifyResourceAccess).Names(names).ToMemberIds(toMemberIds).ToMemberNames(toMemberNames).Execute()

Modify a host

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsPatch(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsPatch``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsPatch`: HostResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsPatch`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsPatchRequest struct via the builder pattern

Name Type Description Notes
host HostPatch
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
contextNames []string Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.
fromMemberIds []string 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.
fromMemberNames []string 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.
modifyResourceAccess string 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.
names []string Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.
toMemberIds []string The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.
toMemberNames []string The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.

Return type

HostResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsPerformanceBalanceGet

HostPerformanceBalanceGetResponse HostsPerformanceBalanceGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Filter(filter).Limit(limit).Names(names).Offset(offset).Sort(sort).TotalItemCount(totalItemCount).Execute()

List host performance balance

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsPerformanceBalanceGet(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsPerformanceBalanceGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsPerformanceBalanceGet`: HostPerformanceBalanceGetResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsPerformanceBalanceGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsPerformanceBalanceGetRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
allowErrors bool If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. [default to false]
contextNames []string Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.
continuationToken string A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.
filter string Narrows down the results to only the response objects that satisfy the filter criteria.
limit int32 Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.
names []string Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
sort []string Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.
totalItemCount bool If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.

Return type

HostPerformanceBalanceGetResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsPerformanceByArrayGet

ResourcePerformanceNoIdByArrayGetResponse HostsPerformanceByArrayGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).EndTime(endTime).Filter(filter).Limit(limit).Names(names).Offset(offset).Resolution(resolution).Sort(sort).StartTime(startTime).TotalItemCount(totalItemCount).TotalOnly(totalOnly).Execute()

List host performance data by array

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsPerformanceByArrayGet(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsPerformanceByArrayGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsPerformanceByArrayGet`: ResourcePerformanceNoIdByArrayGetResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsPerformanceByArrayGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsPerformanceByArrayGetRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
allowErrors bool If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. [default to false]
contextNames []string Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.
continuationToken string A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.
endTime int64 Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.
filter string Narrows down the results to only the response objects that satisfy the filter criteria.
limit int32 Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.
names []string Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
resolution int64 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 (`<object name>/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, (`<object name>/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.
sort []string Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.
startTime int64 Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.
totalItemCount bool If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.
totalOnly bool 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.

Return type

ResourcePerformanceNoIdByArrayGetResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsPerformanceGet

ResourcePerformanceNoIdGetResponse HostsPerformanceGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).EndTime(endTime).Filter(filter).Limit(limit).Names(names).Offset(offset).Resolution(resolution).Sort(sort).StartTime(startTime).TotalItemCount(totalItemCount).TotalOnly(totalOnly).Execute()

List host performance data

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsPerformanceGet(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsPerformanceGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsPerformanceGet`: ResourcePerformanceNoIdGetResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsPerformanceGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsPerformanceGetRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
allowErrors bool If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. [default to false]
contextNames []string Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.
continuationToken string A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.
endTime int64 Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.
filter string Narrows down the results to only the response objects that satisfy the filter criteria.
limit int32 Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.
names []string Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
resolution int64 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 (`<object name>/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, (`<object name>/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.
sort []string Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.
startTime int64 Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.
totalItemCount bool If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.
totalOnly bool 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.

Return type

ResourcePerformanceNoIdGetResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsPost

HostResponse HostsPost(ctx).Host(host).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).Names(names).Execute()

Create a host and upsert tags

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsPost(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsPost`: HostResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsPostRequest struct via the builder pattern

Name Type Description Notes
host HostPost
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
contextNames []string Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.
names []string Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.

Return type

HostResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsProtectionGroupsDelete

HostsProtectionGroupsDelete(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).GroupIds(groupIds).GroupNames(groupNames).MemberNames(memberNames).Execute()

Delete a host from a protection group

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsProtectionGroupsDelete(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsProtectionGroupsDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsProtectionGroupsDeleteRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
contextNames []string Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.
groupIds []string A comma-separated list of group IDs.
groupNames []string 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`.
memberNames []string Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.

Return type

(empty response body)

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

HostsProtectionGroupsGet

MemberNoIdMemberGetResponse HostsProtectionGroupsGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Filter(filter).GroupIds(groupIds).GroupNames(groupNames).Limit(limit).MemberNames(memberNames).Offset(offset).Sort(sort).TotalItemCount(totalItemCount).Execute()

List hosts that are members of protection groups

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsProtectionGroupsGet(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsProtectionGroupsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsProtectionGroupsGet`: MemberNoIdMemberGetResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsProtectionGroupsGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsProtectionGroupsGetRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
allowErrors bool If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. [default to false]
contextNames []string Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.
continuationToken string A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.
filter string Narrows down the results to only the response objects that satisfy the filter criteria.
groupIds []string A comma-separated list of group IDs.
groupNames []string 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`.
limit int32 Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.
memberNames []string Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
sort []string Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.
totalItemCount bool If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.

Return type

MemberNoIdMemberGetResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsProtectionGroupsPost

MemberNoIdMemberResponse HostsProtectionGroupsPost(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).GroupIds(groupIds).GroupNames(groupNames).MemberNames(memberNames).Execute()

Create a host

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsProtectionGroupsPost(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsProtectionGroupsPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsProtectionGroupsPost`: MemberNoIdMemberResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsProtectionGroupsPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsProtectionGroupsPostRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
contextNames []string Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.
groupIds []string A comma-separated list of group IDs.
groupNames []string 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`.
memberNames []string Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.

Return type

MemberNoIdMemberResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsQosGet

HostQosGetResponse HostsQosGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Destroyed(destroyed).EndTime(endTime).Filter(filter).Ids(ids).Limit(limit).Names(names).Offset(offset).Resolution(resolution).Sort(sort).StartTime(startTime).TotalItemCount(totalItemCount).Execute()

List host QoS config

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsQosGet(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsQosGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsQosGet`: HostQosGetResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsQosGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsQosGetRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
allowErrors bool If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. [default to false]
contextNames []string Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.
continuationToken string A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.
destroyed bool If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.
endTime int64 Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.
filter string Narrows down the results to only the response objects that satisfy the filter criteria.
ids []string A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.
limit int32 Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.
names []string Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
resolution int64 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 (`<object name>/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, (`<object name>/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.
sort []string Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.
startTime int64 Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.
totalItemCount bool If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.

Return type

HostQosGetResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsSpaceGet

ResourceSpaceNoIdGetResponse HostsSpaceGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Filter(filter).Limit(limit).Names(names).Offset(offset).Sort(sort).TotalItemCount(totalItemCount).Execute()

List host space information

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsSpaceGet(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsSpaceGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsSpaceGet`: ResourceSpaceNoIdGetResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsSpaceGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsSpaceGetRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
allowErrors bool If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. [default to false]
contextNames []string Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.
continuationToken string A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.
filter string Narrows down the results to only the response objects that satisfy the filter criteria.
limit int32 Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.
names []string Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
sort []string Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.
totalItemCount bool If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.

Return type

ResourceSpaceNoIdGetResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsTagsBatchPut

TagResponse HostsTagsBatchPut(ctx).Tag(tag).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).ResourceIds(resourceIds).ResourceNames(resourceNames).Execute()

Update tags

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsTagsBatchPut(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsTagsBatchPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsTagsBatchPut`: TagResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsTagsBatchPut`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsTagsBatchPutRequest struct via the builder pattern

Name Type Description Notes
tag []NonCopyableTagBatch A list of tags to be created or, if one already exists, updated.
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
contextNames []string Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.
resourceIds []string A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.
resourceNames []string A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.

Return type

TagResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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

HostsTagsDelete

HostsTagsDelete(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).Keys(keys).Namespaces(namespaces).ResourceIds(resourceIds).ResourceNames(resourceNames).Execute()

Delete tags

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsTagsDelete(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsTagsDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsTagsDeleteRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
contextNames []string Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.
keys []string A comma-separated list of tag keys.
namespaces []string A comma-separated list of namespaces.
resourceIds []string A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.
resourceNames []string A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.

Return type

(empty response body)

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

HostsTagsGet

TagGetResponse HostsTagsGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Filter(filter).Limit(limit).Namespaces(namespaces).Offset(offset).ResourceDestroyed(resourceDestroyed).ResourceIds(resourceIds).ResourceNames(resourceNames).Sort(sort).TotalItemCount(totalItemCount).Execute()

List tags

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/PureStorage-OpenConnect/go-pure-client/flasharray/FA_2_56"
)

func main() {
    configuration, err := openapiclient.NewConfigurationBuilder(server.URL).
        APIToken(apiToken).
        Build()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client configuration: %v\n", err)
    }
    apiClient, err := openapiclient.NewClient(configuration)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when creating api client: %v\n", err)
    }
    req := apiClient.HostsAPI.HostsTagsGet(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsTagsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `HostsTagsGet`: TagGetResponse
    fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsTagsGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiHostsTagsGetRequest struct via the builder pattern

Name Type Description Notes
authorization string Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)
xRequestID string Supplied by client during request or generated by server.
allowErrors bool If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. [default to false]
contextNames []string Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.
continuationToken string A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.
filter string Narrows down the results to only the response objects that satisfy the filter criteria.
limit int32 Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.
namespaces []string A comma-separated list of namespaces.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
resourceDestroyed bool 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.
resourceIds []string A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.
resourceNames []string A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.
sort []string Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.
totalItemCount bool If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.

Return type

TagGetResponse

Authorization

Authorization is handled by the Authenticator specified in the configuration and data are filled automatically. Use param authorization only when you need to override this behaviour.

HTTP request headers

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

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