All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| ServersDelete | Delete /api/2.56/servers | Delete server |
| ServersGet | Get /api/2.56/servers | List servers |
| ServersPatch | Patch /api/2.56/servers | Modify server |
| ServersPoliciesTlsDelete | Delete /api/2.56/servers/policies/tls | Delete membership between TLS policies and attached object |
| ServersPoliciesTlsGet | Get /api/2.56/servers/policies/tls | List TLS policies attached to servers |
| ServersPoliciesTlsPost | Post /api/2.56/servers/policies/tls | Create a membership between a server and a TLS policy |
| ServersPost | Post /api/2.56/servers | Create server |
ServersDelete(ctx).Authorization(authorization).XRequestID(xRequestID).CascadeDelete(cascadeDelete).ContextNames(contextNames).Ids(ids).Names(names).Execute()
Delete server
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.ServersAPI.ServersDelete(context.Background())
// Set request parameters ...
resp, r, err := req.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.ServersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiServersDeleteRequest 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. | |
| cascadeDelete | []string | The resource types to delete when deleting the object. It will fail if the resources are referenced by other objects. Valid values include `directory-services`. | |
| 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 name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. |
(empty response body)
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.
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerGetResponse ServersGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Filter(filter).Ids(ids).Limit(limit).Names(names).Offset(offset).Sort(sort).TotalItemCount(totalItemCount).TotalOnly(totalOnly).Execute()
List servers
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.ServersAPI.ServersGet(context.Background())
// Set request parameters ...
resp, r, err := req.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.ServersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ServersGet`: ServerGetResponse
fmt.Fprintf(os.Stdout, "Response from `ServersAPI.ServersGet`: %v\n", resp)
}Other parameters are passed through a pointer to a apiServersGetRequest 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 name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. | |
| 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`. | |
| 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. |
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.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerResponse ServersPatch(ctx).Server(server).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).Ids(ids).Names(names).Execute()
Modify server
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.ServersAPI.ServersPatch(context.Background())
// Set request parameters ...
resp, r, err := req.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.ServersPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ServersPatch`: ServerResponse
fmt.Fprintf(os.Stdout, "Response from `ServersAPI.ServersPatch`: %v\n", resp)
}Other parameters are passed through a pointer to a apiServersPatchRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| server | ServerPatch | ||
| 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 name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. |
Authorization 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.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServersPoliciesTlsDelete(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).MemberIds(memberIds).MemberNames(memberNames).PolicyIds(policyIds).PolicyNames(policyNames).Execute()
Delete membership between TLS policies and attached object
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.ServersAPI.ServersPoliciesTlsDelete(context.Background())
// Set request parameters ...
resp, r, err := req.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.ServersPoliciesTlsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiServersPoliciesTlsDeleteRequest 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`. | |
| 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`. | |
| policyIds | []string | Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. | |
| policyNames | []string | Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`. |
(empty response body)
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.
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PolicyMemberCleanGetResponse ServersPoliciesTlsGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Filter(filter).Limit(limit).MemberIds(memberIds).MemberNames(memberNames).Offset(offset).PolicyIds(policyIds).PolicyNames(policyNames).Sort(sort).TotalItemCount(totalItemCount).Execute()
List TLS policies attached to servers
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.ServersAPI.ServersPoliciesTlsGet(context.Background())
// Set request parameters ...
resp, r, err := req.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.ServersPoliciesTlsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ServersPoliciesTlsGet`: PolicyMemberCleanGetResponse
fmt.Fprintf(os.Stdout, "Response from `ServersAPI.ServersPoliciesTlsGet`: %v\n", resp)
}Other parameters are passed through a pointer to a apiServersPoliciesTlsGetRequest 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. | |
| 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. | |
| policyIds | []string | Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. | |
| policyNames | []string | Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`. | |
| 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`. |
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.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PolicyMemberCleanResponse ServersPoliciesTlsPost(ctx).Policies(policies).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).MemberIds(memberIds).MemberNames(memberNames).Execute()
Create a membership between a server and a TLS policy
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.ServersAPI.ServersPoliciesTlsPost(context.Background())
// Set request parameters ...
resp, r, err := req.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.ServersPoliciesTlsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ServersPoliciesTlsPost`: PolicyMemberCleanResponse
fmt.Fprintf(os.Stdout, "Response from `ServersAPI.ServersPoliciesTlsPost`: %v\n", resp)
}Other parameters are passed through a pointer to a apiServersPoliciesTlsPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| policies | PolicyAssignmentPost | ||
| 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`. | |
| 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`. |
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.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerResponse ServersPost(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).CreateLocalDirectoryService(createLocalDirectoryService).Names(names).Server(server).Execute()
Create server
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.ServersAPI.ServersPost(context.Background())
// Set request parameters ...
resp, r, err := req.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.ServersPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ServersPost`: ServerResponse
fmt.Fprintf(os.Stdout, "Response from `ServersAPI.ServersPost`: %v\n", resp)
}Other parameters are passed through a pointer to a apiServersPostRequest 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`. | |
| createLocalDirectoryService | string | The name of the local directory service object to be created and associated to the server. This parameter cannot be used together with `local_directory_service` property in the request entity. | |
| names | []string | Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. | |
| server | ServerPost |
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.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]