Skip to content

Latest commit

 

History

History
506 lines (352 loc) · 27.8 KB

ArrayConnectionsAPI.md

File metadata and controls

506 lines (352 loc) · 27.8 KB

\ArrayConnectionsAPI

All URIs are relative to http://localhost

Method HTTP request Description
ArrayConnectionsConnectionKeyGet Get /api/2.56/array-connections/connection-key List connection key
ArrayConnectionsDelete Delete /api/2.56/array-connections Delete an array connection
ArrayConnectionsGet Get /api/2.56/array-connections List the connected arrays
ArrayConnectionsPatch Patch /api/2.56/array-connections Modify an array connection
ArrayConnectionsPathGet Get /api/2.56/array-connections/path List connection path
ArrayConnectionsPost Post /api/2.56/array-connections Create an array connection

ArrayConnectionsConnectionKeyGet

ArrayConnectionKeyGetResponse ArrayConnectionsConnectionKeyGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).Encrypted(encrypted).Execute()

List connection 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.ArrayConnectionsAPI.ArrayConnectionsConnectionKeyGet(context.Background())
    // Set request parameters ...

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiArrayConnectionsConnectionKeyGetRequest 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`.
encrypted bool If `true`, the returned array connection key will encode an encryption key used to establish trust and secure replication traffic. If `false`, the returned array connection key will not encode an encryption key. If not specified, defaults to `false`.

Return type

ArrayConnectionKeyGetResponse

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]

ArrayConnectionsDelete

ArrayConnectionsDelete(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).Ids(ids).Names(names).Execute()

Delete an array connection

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

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ArrayConnectionsAPI.ArrayConnectionsDelete``: %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 apiArrayConnectionsDeleteRequest 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`.
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.
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]

ArrayConnectionsGet

ArrayConnectionGetResponse ArrayConnectionsGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Filter(filter).Ids(ids).Limit(limit).Names(names).Offset(offset).RemoteIds(remoteIds).RemoteNames(remoteNames).Sort(sort).TotalItemCount(totalItemCount).Execute()

List the connected arrays

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

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiArrayConnectionsGetRequest 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.
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.
remoteIds []string A comma-separated list of remote array IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter.
remoteNames []string A comma-separated list of remote array names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_ids` query parameter.
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

ArrayConnectionGetResponse

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]

ArrayConnectionsPatch

ArrayConnectionResponse ArrayConnectionsPatch(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).Ids(ids).Names(names).Refresh(refresh).RenewEncryptionKey(renewEncryptionKey).ArrayConnection(arrayConnection).Execute()

Modify an array connection

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

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiArrayConnectionsPatchRequest 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`.
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.
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.
refresh bool If set to `true`, the array will attempt to communicate with the connection peer in order to update the connection attributes on both arrays with any changes that have occurred. If set to `true`, other array connection attributes may not be modified in requests. Default value is `false`.
renewEncryptionKey bool If set to `true`, update array connection with a new encryption key. If set to `true`, other array connection attributes may not be modified in requests. Defaults to `false`.
arrayConnection ArrayConnectionPatch

Return type

ArrayConnectionResponse

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]

ArrayConnectionsPathGet

ArrayConnectionPathGetResponse ArrayConnectionsPathGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Filter(filter).Ids(ids).Limit(limit).Names(names).Offset(offset).RemoteIds(remoteIds).RemoteNames(remoteNames).Sort(sort).TotalItemCount(totalItemCount).Execute()

List connection path

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

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiArrayConnectionsPathGetRequest 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.
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.
remoteIds []string A comma-separated list of remote array IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter.
remoteNames []string A comma-separated list of remote array names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_ids` query parameter.
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

ArrayConnectionPathGetResponse

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]

ArrayConnectionsPost

ArrayConnectionResponse ArrayConnectionsPost(ctx).ArrayConnection(arrayConnection).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).Execute()

Create an array connection

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

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

Path Parameters

Other Parameters

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

Name Type Description Notes
arrayConnection ArrayConnectionPost
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`.

Return type

ArrayConnectionResponse

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]