Skip to content

Latest commit

 

History

History
434 lines (305 loc) · 26.2 KB

File metadata and controls

434 lines (305 loc) · 26.2 KB

\RemoteVolumeSnapshotsAPI

All URIs are relative to http://localhost

Method HTTP request Description
RemoteVolumeSnapshotsDelete Delete /api/2.48/remote-volume-snapshots Delete a remote volume snapshot
RemoteVolumeSnapshotsGet Get /api/2.48/remote-volume-snapshots List remote volume snapshots
RemoteVolumeSnapshotsPatch Patch /api/2.48/remote-volume-snapshots Modify a remote volume snapshot
RemoteVolumeSnapshotsPost Post /api/2.48/remote-volume-snapshots Create a volume snapshot on a connected remote target or offload target
RemoteVolumeSnapshotsTransferGet Get /api/2.48/remote-volume-snapshots/transfer List remote volume snapshots with transfer statistics

RemoteVolumeSnapshotsDelete

RemoteVolumeSnapshotsDelete(ctx).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).Names(names).On(on).ReplicationSnapshot(replicationSnapshot).Execute()

Delete a remote volume snapshot

Example

package main

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

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

    resp, r, err := req.Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RemoteVolumeSnapshotsAPI.RemoteVolumeSnapshotsDelete``: %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 apiRemoteVolumeSnapshotsDeleteRequest 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. If not specified, the context will default to the array 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 name specified. Enter multiple names in comma-separated format. For example, `name01,name02`.
on string Performs the operation on the target name specified. For example, `targetName01`.
replicationSnapshot bool If set to `true`, allow destruction/eradication of snapshots in use by replication. If set to `false`, allow destruction/eradication of snapshots not in use by replication. If not specified, defaults to `false`.

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]

RemoteVolumeSnapshotsGet

RemoteVolumeSnapshotGetResponse RemoteVolumeSnapshotsGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Destroyed(destroyed).Filter(filter).Ids(ids).Limit(limit).Names(names).Offset(offset).On(on).Sort(sort).SourceIds(sourceIds).SourceNames(sourceNames).TotalItemCount(totalItemCount).Execute()

List remote volume snapshots

Example

package main

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

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

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiRemoteVolumeSnapshotsGetRequest 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. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such 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.
ids []string Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together.
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. For example, `name01,name02`.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
on []string Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.
sort []string Returns the response objects in the order specified. Set `sort` to the name in the response by which to sort. Sorting can be performed on any of the names in the response, and the objects can be sorted in ascending or descending order. By default, the response objects are sorted in ascending order. To sort in descending order, append the minus sign (`-`) to the name. A single request can be sorted on multiple objects. For example, you can sort all volumes from largest to smallest volume size, and then sort volumes of the same size in ascending order by volume name. To sort on multiple names, list the names as comma-separated values.
sourceIds []string Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.
sourceNames []string Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.
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

RemoteVolumeSnapshotGetResponse

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]

RemoteVolumeSnapshotsPatch

RemoteVolumeSnapshotResponse RemoteVolumeSnapshotsPatch(ctx).RemoteVolumeSnapshot(remoteVolumeSnapshot).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).Names(names).On(on).ReplicationSnapshot(replicationSnapshot).Execute()

Modify a remote volume snapshot

Example

package main

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

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

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

Path Parameters

Other Parameters

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

Name Type Description Notes
remoteVolumeSnapshot DestroyedPatchPost
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. If not specified, the context will default to the array 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 name specified. Enter multiple names in comma-separated format. For example, `name01,name02`.
on string Performs the operation on the target name specified. For example, `targetName01`.
replicationSnapshot bool If set to `true`, allow destruction/eradication of snapshots in use by replication. If set to `false`, allow destruction/eradication of snapshots not in use by replication. If not specified, defaults to `false`.

Return type

RemoteVolumeSnapshotResponse

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]

RemoteVolumeSnapshotsPost

RemoteVolumeSnapshotResponse RemoteVolumeSnapshotsPost(ctx).RemoteVolumeSnapshot(remoteVolumeSnapshot).Authorization(authorization).XRequestID(xRequestID).ContextNames(contextNames).On(on).SourceIds(sourceIds).SourceNames(sourceNames).Execute()

Create a volume snapshot on a connected remote target or offload target

Example

package main

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

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

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

Path Parameters

Other Parameters

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

Name Type Description Notes
remoteVolumeSnapshot RemoteVolumeSnapshotPost
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. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.
on string Performs the operation on the target name specified. For example, `targetName01`.
sourceIds []string Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.
sourceNames []string Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.

Return type

RemoteVolumeSnapshotResponse

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]

RemoteVolumeSnapshotsTransferGet

RemoteVolumeSnapshotTransferGetResponse RemoteVolumeSnapshotsTransferGet(ctx).Authorization(authorization).XRequestID(xRequestID).AllowErrors(allowErrors).ContextNames(contextNames).ContinuationToken(continuationToken).Destroyed(destroyed).Filter(filter).Ids(ids).Limit(limit).Names(names).Offset(offset).On(on).Sort(sort).SourceIds(sourceIds).SourceNames(sourceNames).TotalItemCount(totalItemCount).TotalOnly(totalOnly).Execute()

List remote volume snapshots with transfer statistics

Example

package main

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

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

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

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiRemoteVolumeSnapshotsTransferGetRequest 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. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such 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.
ids []string Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together.
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. For example, `name01,name02`.
offset int32 The starting position based on the results of the query in relation to the full set of response objects returned.
on []string Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.
sort []string Returns the response objects in the order specified. Set `sort` to the name in the response by which to sort. Sorting can be performed on any of the names in the response, and the objects can be sorted in ascending or descending order. By default, the response objects are sorted in ascending order. To sort in descending order, append the minus sign (`-`) to the name. A single request can be sorted on multiple objects. For example, you can sort all volumes from largest to smallest volume size, and then sort volumes of the same size in ascending order by volume name. To sort on multiple names, list the names as comma-separated values.
sourceIds []string Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.
sourceNames []string Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.
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

RemoteVolumeSnapshotTransferGetResponse

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]