Skip to content

Latest commit

 

History

History
733 lines (504 loc) · 30.1 KB

FleetsAPI.md

File metadata and controls

733 lines (504 loc) · 30.1 KB

\FleetsAPI

All URIs are relative to http://localhost

Method HTTP request Description
FleetsDelete Delete /api/2.56/fleets Delete a fleet
FleetsFleetKeyGet Get /api/2.56/fleets/fleet-key Get fleet key information
FleetsFleetKeyPost Post /api/2.56/fleets/fleet-key Create a fleet key
FleetsGet Get /api/2.56/fleets List fleets
FleetsMembersDelete Delete /api/2.56/fleets/members Delete fleet members
FleetsMembersGet Get /api/2.56/fleets/members List fleet members
FleetsMembersPost Post /api/2.56/fleets/members Add members to a fleet
FleetsPatch Patch /api/2.56/fleets Modify a fleet
FleetsPost Post /api/2.56/fleets Create a fleet

FleetsDelete

FleetsDelete(ctx).Authorization(authorization).XRequestID(xRequestID).Ids(ids).Names(names).Execute()

Delete a fleet

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.FleetsAPI.FleetsDelete(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FleetsAPI.FleetsDelete``: %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 apiFleetsDeleteRequest 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.
ids []string Performs the operation on the unique resource IDs specified. Only one value is supported.
names []string Performs the operation on the unique resource names specified. Only one value is supported.

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]

FleetsFleetKeyGet

FleetKeyGetResponse FleetsFleetKeyGet(ctx).Authorization(authorization).XRequestID(xRequestID).ContinuationToken(continuationToken).Filter(filter).Limit(limit).Offset(offset).Sort(sort).TotalItemCount(totalItemCount).Execute()

Get fleet key 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.FleetsAPI.FleetsFleetKeyGet(context.Background())
    // Set request parameters ...

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiFleetsFleetKeyGetRequest 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.
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.
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

FleetKeyGetResponse

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]

FleetsFleetKeyPost

FleetKeyResponse FleetsFleetKeyPost(ctx).Authorization(authorization).XRequestID(xRequestID).Execute()

Create a fleet key

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.FleetsAPI.FleetsFleetKeyPost(context.Background())
    // Set request parameters ...

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiFleetsFleetKeyPostRequest 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.

Return type

FleetKeyResponse

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]

FleetsGet

FleetGetResponse FleetsGet(ctx).Authorization(authorization).XRequestID(xRequestID).ContinuationToken(continuationToken).Filter(filter).Ids(ids).Limit(limit).Names(names).Offset(offset).Sort(sort).TotalItemCount(totalItemCount).Execute()

List fleets

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.FleetsAPI.FleetsGet(context.Background())
    // Set request parameters ...

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiFleetsGetRequest 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.
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.
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 resource names specified. Only one value is supported.
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

FleetGetResponse

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]

FleetsMembersDelete

FleetsMembersDelete(ctx).Authorization(authorization).XRequestID(xRequestID).MemberIds(memberIds).MemberNames(memberNames).Unreachable(unreachable).Execute()

Delete fleet members

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.FleetsAPI.FleetsMembersDelete(context.Background())
    // Set request parameters ...

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FleetsAPI.FleetsMembersDelete``: %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 apiFleetsMembersDeleteRequest 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.
memberIds []string Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.
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`.
unreachable bool 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`.

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]

FleetsMembersGet

FleetMemberGetResponse FleetsMembersGet(ctx).Authorization(authorization).XRequestID(xRequestID).ContinuationToken(continuationToken).Filter(filter).FleetIds(fleetIds).FleetNames(fleetNames).Limit(limit).MemberIds(memberIds).MemberNames(memberNames).Offset(offset).Sort(sort).TotalItemCount(totalItemCount).Execute()

List fleet members

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.FleetsAPI.FleetsMembersGet(context.Background())
    // Set request parameters ...

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiFleetsMembersGetRequest 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.
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.
fleetIds []string Performs the operation on the unique Fleet IDs specified. This query currently accepts only 1 ID.
fleetNames []string 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.
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.
memberIds []string Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.
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

FleetMemberGetResponse

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]

FleetsMembersPost

FleetMemberResponse FleetsMembersPost(ctx).Authorization(authorization).XRequestID(xRequestID).FleetIds(fleetIds).FleetNames(fleetNames).Members(members).Execute()

Add members to a fleet

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.FleetsAPI.FleetsMembersPost(context.Background())
    // Set request parameters ...

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiFleetsMembersPostRequest 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.
fleetIds []string Performs the operation on the unique Fleet IDs specified. This query currently accepts only 1 ID.
fleetNames []string 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.
members FleetMemberPost Info about the members being added to fleet.

Return type

FleetMemberResponse

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]

FleetsPatch

FleetResponse FleetsPatch(ctx).Fleet(fleet).Authorization(authorization).XRequestID(xRequestID).Ids(ids).Names(names).Execute()

Modify a fleet

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.FleetsAPI.FleetsPatch(context.Background())
    // Set request parameters ...

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

Path Parameters

Other Parameters

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

Name Type Description Notes
fleet FleetPatch
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.
ids []string Performs the operation on the unique resource IDs specified. Only one value is supported.
names []string Performs the operation on the unique resource names specified. Only one value is supported.

Return type

FleetResponse

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]

FleetsPost

FleetResponse FleetsPost(ctx).Authorization(authorization).XRequestID(xRequestID).Names(names).Execute()

Create a fleet

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.FleetsAPI.FleetsPost(context.Background())
    // Set request parameters ...

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiFleetsPostRequest 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.
names []string Performs the operation on the unique resource names specified. Only one value is supported.

Return type

FleetResponse

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]