Introduction
With the IBM® Storage Ceph® as a Service Block Storage API, you can programmatically provision and manage block storage resources within a IBM Storage Ceph as a Service deployment, including volumes, hosts, and volume to host mappings. For more information, see About IBM Storage Ceph as a Service APIs.
SDKs
SDK for Go is available for this API. The client libraries that are provided by the SDK implement best practices for using the API and reduce the amount of code that you need to write. The tab for each language includes code examples that demonstrate how to use the client libraries.
For more details about using IBM Storage Ceph as a Service, see docs.
Installing the Go SDK
Go modules (recommended): Add the following import in your code, and then run go build or go mod tidy
import (
"github.com/IBM/sds-go-sdk/sdsaasv1"
)
Go get
go get -u github.com/IBM/sds-go-sdk/sdsaasv1
View on GitHub
Authentication
The IBM Storage Ceph as a Service Block Storage API uses Identity and Access Management (IAM) to authenticate requests. To call each API method, you must be assigned a role that has access to the parent service instance. Check your access on the IBM Cloud console by navigating to Users > User > Access.
Learn about obtaining an IAM token for an authenticated user or service ID in the IAM Identity Services API.
If you first create an API key, you can use it to generate an IAM token.
To use the API, add a valid IAM token to the HTTP Authorization request header. For example, -H 'Authorization: Bearer {token}'.
When you use the SDK, configure an IAM authenticator with the IAM API key. The authenticator automatically obtains the IAM access token for the API key and includes it with each request. You can construct an authenticator in either of two ways:
- Programmatically by constructing an IAM authenticator instance and supplying your IAM API key.
- By defining the API key in external configuration properties, and then by using the SDK authenticator factory to construct an IAM authenticator that uses the configured IAM API key.
In this example of using external configuration properties, an IAM authenticator instance is created with the configured API key, and then the service client is constructed with this authenticator instance and the configured service URL.
For more information, see the Authentication section of the IBM Cloud SDK Common documentation.
IAM action information
To call each method, you need to be assigned a role that includes the required IAM actions. Each method lists the associated action. For more information about IAM actions and how they map to roles, see Assigning access to account management services.
To retrieve your access token:
curl -X POST "https://iam.cloud.ibm.com/identity/token" --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' --data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey' --data-urlencode 'apikey={API_KEY}'
Replace {API_KEY} with your IAM API key.
Setting client options through external configuration
Example environment variables, where {SERVICE_URL} is the endpoint URL and {API_KEY} is your IAM API key
export GLOBAL_SEARCH_URL={SERVICE_URL}
export GLOBAL_SEARCH_AUTHTYPE=iam
export GLOBAL_SEARCH_APIKEY={API_KEY}
Example of constructing the service client
import {
"github.com/IBM/sds-go-sdk/sdsaasv1"
}
...
authenticator := &core.IamAuthenticator{
ApiKey: <apiKey>,
}
sdsaasServiceOptions := &sdsaasv1.SdsaasV1Options{
URL: <serviceEndpoint>,
Authenticator: authenticator,
}
sdsaasService, err = sdsaasv1.NewSdsaasV1(sdsaasServiceOptions)
if err != nil {
panic(err)
}
Auditing
You can monitor API activity within your account. Whenever an API method is called, an event is generated which you can then track and audit. The specific event type is listed for each method that generates auditing events. For methods that don't list any events, no events are generated.
For more information about how to track IBM Storage Ceph as a Service activity, see Auditing the events for IBM Storage Ceph as a Service.
Error handling
This API uses standard HTTP response codes to indicate whether a method was completed successfully. A 200 response indicates success. A 400 type response indicates a failure, and a 500 type response indicates an internal system error.
| HTTP Error Code | Description | Recovery |
|---|---|---|
400 |
Bad Request | The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all the required parameters in your request. |
401 |
Unauthorized | You are not authorized to make this request. If this error persists, contact the account owner to check your permissions. |
403 |
Forbidden | The supplied authentication is not authorized to perform the requested operation. You do not have valid access through IAM access policies. If this error persists, contact the account owner to check your permissions. |
404 |
Not Found | The requested resource could not be found. |
405 |
Method Not Allowed | The requested resource does not support the request method. |
406 |
Not Acceptable | The resource the client had requested is not available in a format that is allowed by the Accept header that is supplied by the client. |
408 |
Request timeout | The connection to the server timed out. Wait a few minutes, then try again. |
409 |
Conflict | The request cannot be completed because of a conflict between the request and the current state of the resource. |
500 |
Internal Server Error | The request cannot be processed because the client encountered an unexpected condition on the server. Wait a few minutes and try submitting the request again. If this error persists, contact IBM Support. |
501 |
Not Implemented | The server either does not recognize the request method, or it lacks the ability to fulfill the request. |
502 |
Bad Gateway | The server was acting as a gateway or proxy and received an invalid response from the upstream server. |
503 |
Service Unavailable | The server cannot process the request. Generally, this condition is temporary, such as when a server is overloaded or down for scheduled maintenance. This condition could also be due to an unplanned outage of a service that is needed to process the request. Wait a few minutes and try submitting the request again. If this error persists, contact IBM Support. |
504 |
Gateway timeout | The server was acting as a gateway or proxy and did not receive a timely response from the upstream server. |
505 |
HTTP Version Not Supported | The server does not support the HTTP protocol version that is used in the request. |
Methods
List all Volumes
This request lists volumes in the deployment. Volumes are network-connected block storage devices that may be mapped to one or more hosts in the same deployment.
This request lists volumes in the deployment. Volumes are network-connected block storage devices that may be mapped to one or more hosts in the same deployment.
GET /volumes
(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) ListVolumes(listVolumesOptions *ListVolumesOptions) (result *VolumeCollection, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) ListVolumesWithContext(ctx context.Context, listVolumesOptions *ListVolumesOptions) (result *VolumeCollection, response *core.DetailedResponse, err error)Request
Instantiate the ListVolumesOptions struct and set the fields to provide parameter values for the ListVolumes method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Query Parameters
A server-provided token determining what resource to start the page on
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The number of resources to return on a page
Possible values: 1 ≤ value ≤ 1000
Default:
1000Example:
20Filters the collection of resources with a name property matching the exact specified name
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resource
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListVolumes options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01A server-provided token determining what resource to start the page on.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The number of resources to return on a page.
Possible values: 1 ≤ value ≤ 1000
Default:
1000Examples:20Filters the collection of resources with a name property matching the exact specified name.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
curl -X GET --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' "${base_url}/volumes?start=r134-b274-678d-4dfb-8981-c71dd9d4daa5&limit=20&name=my-resource"
listVolumesOptions := &ibmstoragecephasaserviceblockstorageapiv1.ListVolumesOptions{ IBMAPIVersion: CreateMockDate("2025-02-01"), Limit: core.Int64Ptr(int64(20)), Name: core.StringPtr("my-resource"), } pager, err := ibmStorageCephAsAServiceBlockStorageApiService.NewVolumesPager(listVolumesOptions) if err != nil { panic(err) } var allResults []ibmstoragecephasaserviceblockstorageapiv1.Volume for pager.HasNext() { nextPage, err := pager.GetNext() if err != nil { panic(err) } allResults = append(allResults, nextPage...) } b, _ := json.MarshalIndent(allResults, "", " ") fmt.Println(string(b))
Response
A page of volumes
Collection of volumes
Possible values: 0 ≤ number of items ≤ 1000
A link to the first page of resources
The maximum number of resources that can be returned by the request
Possible values: 1 ≤ value ≤ 1000
Example:
20The total number of resources across all pages Example: 132
Possible values: 1 ≤ value ≤ 1000
Example:
20A link to the next page of resources. This property is present for all pages except the last page
A page of volumes.
Collection of volumes.
Possible values: 0 ≤ number of items ≤ 1000
- Volumes
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The date and time when the resource was created.
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/The capacity of the volume (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Examples:30Total number snapshots created from this volume.
Possible values: 0 ≤ value ≤ 512
Examples:5The maximum bandwidth (in megabits per second) for the volume Example: 1000.
Possible values: 1 ≤ value ≤ 8192
The maximum I/O operations per second (IOPS) for this volume. Example: 10000.
Possible values: 150 ≤ value ≤ 96000
List of volume mappings for this volume.
Possible values: 0 ≤ number of items ≤ 32
- VolumeMappings
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:mapped
The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[-0-9a-z_]+$/Examples:1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Host mapping schema.
- Host
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234
The NVMe target subsystem NQN (NVMe Qualified Name) that can be used for doing NVMe connect by the initiator.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234The NVMe namespace properties for a given volume mapping.
- Namespace
NVMe namespace ID that can be used to co-relate the discovered devices on host to the corresponding volume.
Possible values: 1 ≤ value ≤ 32
UUID of the NVMe namespace.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/
List of NVMe gateways.
Possible values: 0 ≤ number of items ≤ 10
- Gateways
IP address of the NVMe gateway node.
Possible values: 7 ≤ length ≤ 15, Value must match regular expression
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/Examples:192.168.3.4Port number of the NVMe gateway.
Possible values: 1 ≤ value ≤ 65535
Examples:22
The status of the volume resource. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:available
The reasons for the current status (if any).
Possible values: 0 ≤ number of items ≤ 10
- StatusReasons
A snake case string succinctly identifying the status reason.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/An explanation of the status reason.
Possible values: 10 ≤ length ≤ 1000, Value must match regular expression
/^[ -~\\n\\r\\t]*$/Examples:Specified resource not found
Link to documentation about this status reason.
Possible values: 10 ≤ length ≤ 8000
The source snapshot this volume was created from.
- SourceSnapshot
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
A link to the first page of resources.
- First
The URL for a page of resources.
Possible values: 10 ≤ length ≤ 1000
The maximum number of resources that can be returned by the request.
Possible values: 1 ≤ value ≤ 1000
Examples:20A link to the next page of resources. This property is present for all pages except the last page.
- Next
The URL for a page of resources.
Possible values: 10 ≤ length ≤ 1000
The total number of resources across all pages Example: 132.
Possible values: 1 ≤ value ≤ 1000
Examples:20
Status Code
The volumes were retrieved successfully
No Sample Response
Create a Volume
This request creates a new volume from a volume prototype object. The prototype object is structured in the same way as a retrieved volume, and contains the information necessary to create the new volume.
This request creates a new volume from a volume prototype object. The prototype object is structured in the same way as a retrieved volume, and contains the information necessary to create the new volume.
POST /volumes
(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) CreateVolume(createVolumeOptions *CreateVolumeOptions) (result *VolumeSummary, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) CreateVolumeWithContext(ctx context.Context, createVolumeOptions *CreateVolumeOptions) (result *VolumeSummary, response *core.DetailedResponse, err error)Request
Instantiate the CreateVolumeOptions struct and set the fields to provide parameter values for the CreateVolume method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Volume Template
{
"name": "my-volume"
}The capacity to use for the volume (in gigabytes). Example: 40
Possible values: 1 ≤ value ≤ 32000
The name for this volume. The name must not be used by another volume. If unspecified, the name will be a hyphenated list of randomly-selected words.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$Example:
my-volumeThe source snapshot this volume was created from.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateVolume options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The capacity to use for the volume (in gigabytes). Example: 40.
Possible values: 1 ≤ value ≤ 32000
The name for this volume. The name must not be used by another volume. If unspecified, the name will be a hyphenated list of randomly-selected words.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$/Examples:my-volume
The source snapshot this volume was created from.
- SourceSnapshot
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X POST --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' --header 'Content-Type: application/json' --data '{ "capacity": 1 }' "${base_url}/volumes"
createVolumeOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewCreateVolumeOptions( CreateMockDate("2025-02-01"), int64(1), ) volumeSummary, response, err := ibmStorageCephAsAServiceBlockStorageApiService.CreateVolume(createVolumeOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(volumeSummary, "", " ") fmt.Println(string(b))
Response
The volume object
The unique identifier for this resource
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resourceThe date and time when the resource was created
Possible values: 10 ≤ length ≤ 64
The type of this resource
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$The capacity of the volume (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Example:
30The maximum bandwidth (in megabits per second) for the volume Example: 1000
Possible values: 1 ≤ value ≤ 8192
The maximum I/O operations per second (IOPS) for this volume. Example: 10000
Possible values: 150 ≤ value ≤ 96000
The status of the volume resource. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$Example:
availableThe reasons for the current status (if any).
Possible values: 0 ≤ number of items ≤ 10
The volume object.
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The date and time when the resource was created.
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/The capacity of the volume (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Examples:30The maximum bandwidth (in megabits per second) for the volume Example: 1000.
Possible values: 1 ≤ value ≤ 8192
The maximum I/O operations per second (IOPS) for this volume. Example: 10000.
Possible values: 150 ≤ value ≤ 96000
The status of the volume resource. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:available
The reasons for the current status (if any).
Possible values: 0 ≤ number of items ≤ 10
- StatusReasons
A snake case string succinctly identifying the status reason.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/An explanation of the status reason.
Possible values: 10 ≤ length ≤ 1000, Value must match regular expression
/^[ -~\\n\\r\\t]*$/Examples:Specified resource not found
Link to documentation about this status reason.
Possible values: 10 ≤ length ≤ 8000
Status Code
Volume creation request has been accepted
An invalid volume object was provided
{ "capacity": 30 }{ "capacity": 30 }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
Delete a volume
This request deletes a volume. This operation cannot be reversed. For this request to succeed, the volume must not be mapped to any hosts.
This request deletes a volume. This operation cannot be reversed. For this request to succeed, the volume must not be mapped to any hosts.
DELETE /volumes/{id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteVolume(deleteVolumeOptions *DeleteVolumeOptions) (response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteVolumeWithContext(ctx context.Context, deleteVolumeOptions *DeleteVolumeOptions) (response *core.DetailedResponse, err error)Request
Instantiate the DeleteVolumeOptions struct and set the fields to provide parameter values for the DeleteVolume method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The volume identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteVolume options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The volume identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X DELETE --location --header "Authorization: Bearer IAM_TOKEN" --header 'IBM-API-Version: "2025-02-01"' "${base_url}/volumes/ID"
deleteVolumeOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewDeleteVolumeOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", ) response, err := ibmStorageCephAsAServiceBlockStorageApiService.DeleteVolume(deleteVolumeOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteVolume(): %d\n", response.StatusCode) }
Response
Status Code
The volume was deleted successfully
Volume with specified id not found
Volume cannot be deleted as it is mapped to one or more hosts
{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
Retrieve a volume
This request retrieves a single volume specified by the identifier in the URL
This request retrieves a single volume specified by the identifier in the URL.
GET /volumes/{id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) GetVolume(getVolumeOptions *GetVolumeOptions) (result *Volume, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) GetVolumeWithContext(ctx context.Context, getVolumeOptions *GetVolumeOptions) (result *Volume, response *core.DetailedResponse, err error)Request
Instantiate the GetVolumeOptions struct and set the fields to provide parameter values for the GetVolume method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The volume identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetVolume options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The volume identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X GET --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' "${base_url}/volumes/ID"
getVolumeOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewGetVolumeOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", ) volume, response, err := ibmStorageCephAsAServiceBlockStorageApiService.GetVolume(getVolumeOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(volume, "", " ") fmt.Println(string(b))
Response
The volume object
The unique identifier for this resource
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resourceThe date and time when the resource was created
Possible values: 10 ≤ length ≤ 64
The type of this resource
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$The capacity of the volume (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Example:
30The maximum bandwidth (in megabits per second) for the volume Example: 1000
Possible values: 1 ≤ value ≤ 8192
The maximum I/O operations per second (IOPS) for this volume. Example: 10000
Possible values: 150 ≤ value ≤ 96000
List of volume mappings for this volume
Possible values: 0 ≤ number of items ≤ 32
The status of the volume resource. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$Example:
availableThe reasons for the current status (if any).
Possible values: 0 ≤ number of items ≤ 10
The source snapshot this volume was created from.
Total number snapshots created from this volume.
Possible values: 0 ≤ value ≤ 512
Example:
5
The volume object.
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The date and time when the resource was created.
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/The capacity of the volume (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Examples:30Total number snapshots created from this volume.
Possible values: 0 ≤ value ≤ 512
Examples:5The maximum bandwidth (in megabits per second) for the volume Example: 1000.
Possible values: 1 ≤ value ≤ 8192
The maximum I/O operations per second (IOPS) for this volume. Example: 10000.
Possible values: 150 ≤ value ≤ 96000
List of volume mappings for this volume.
Possible values: 0 ≤ number of items ≤ 32
- VolumeMappings
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:mapped
The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[-0-9a-z_]+$/Examples:1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Host mapping schema.
- Host
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234
The NVMe target subsystem NQN (NVMe Qualified Name) that can be used for doing NVMe connect by the initiator.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234The NVMe namespace properties for a given volume mapping.
- Namespace
NVMe namespace ID that can be used to co-relate the discovered devices on host to the corresponding volume.
Possible values: 1 ≤ value ≤ 32
UUID of the NVMe namespace.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/
List of NVMe gateways.
Possible values: 0 ≤ number of items ≤ 10
- Gateways
IP address of the NVMe gateway node.
Possible values: 7 ≤ length ≤ 15, Value must match regular expression
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/Examples:192.168.3.4Port number of the NVMe gateway.
Possible values: 1 ≤ value ≤ 65535
Examples:22
The status of the volume resource. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:available
The reasons for the current status (if any).
Possible values: 0 ≤ number of items ≤ 10
- StatusReasons
A snake case string succinctly identifying the status reason.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/An explanation of the status reason.
Possible values: 10 ≤ length ≤ 1000, Value must match regular expression
/^[ -~\\n\\r\\t]*$/Examples:Specified resource not found
Link to documentation about this status reason.
Possible values: 10 ≤ length ≤ 8000
The source snapshot this volume was created from.
- SourceSnapshot
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
Status Code
The volume was retrieved successfully
A volume with the specified identifier could not be found
{ "capacity": 30, "snapshot_count": 5 }{ "capacity": 30, "snapshot_count": 5 }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
Update a volume
This request updates a volume with the information in a provided volume patch. The volume patch object is structured in the same way as a retrieved volume and contains only the information to be updated.
This request updates a volume with the information in a provided volume patch. The volume patch object is structured in the same way as a retrieved volume and contains only the information to be updated.
PATCH /volumes/{id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) UpdateVolume(updateVolumeOptions *UpdateVolumeOptions) (result *Volume, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) UpdateVolumeWithContext(ctx context.Context, updateVolumeOptions *UpdateVolumeOptions) (result *Volume, response *core.DetailedResponse, err error)Request
Instantiate the UpdateVolumeOptions struct and set the fields to provide parameter values for the UpdateVolume method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The volume identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
Volume patch request body
{
"capacity": 100,
"name": "my-volume"
}The capacity to use for the volume (in gigabytes). Additionally, the specified value must not be less than the current capacity.
Possible values: 2 ≤ value ≤ 32000
Example:
100The name for this volume. The name must not be used by another volume.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$Example:
my-volume
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateVolume options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The volume identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5Volume patch request body.
curl -X PATCH --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' --header 'Content-Type: application/merge-patch+json' --data '' "${base_url}/volumes/ID"
volumePatchModel := &ibmstoragecephasaserviceblockstorageapiv1.VolumePatch{ } volumePatchModelAsPatch, asPatchErr := volumePatchModel.AsPatch() Expect(asPatchErr).To(BeNil()) updateVolumeOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewUpdateVolumeOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", volumePatchModelAsPatch, ) volume, response, err := ibmStorageCephAsAServiceBlockStorageApiService.UpdateVolume(updateVolumeOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(volume, "", " ") fmt.Println(string(b))
Response
The volume object
The unique identifier for this resource
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resourceThe date and time when the resource was created
Possible values: 10 ≤ length ≤ 64
The type of this resource
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$The capacity of the volume (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Example:
30The maximum bandwidth (in megabits per second) for the volume Example: 1000
Possible values: 1 ≤ value ≤ 8192
The maximum I/O operations per second (IOPS) for this volume. Example: 10000
Possible values: 150 ≤ value ≤ 96000
List of volume mappings for this volume
Possible values: 0 ≤ number of items ≤ 32
The status of the volume resource. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$Example:
availableThe reasons for the current status (if any).
Possible values: 0 ≤ number of items ≤ 10
The source snapshot this volume was created from.
Total number snapshots created from this volume.
Possible values: 0 ≤ value ≤ 512
Example:
5
The volume object.
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The date and time when the resource was created.
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/The capacity of the volume (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Examples:30Total number snapshots created from this volume.
Possible values: 0 ≤ value ≤ 512
Examples:5The maximum bandwidth (in megabits per second) for the volume Example: 1000.
Possible values: 1 ≤ value ≤ 8192
The maximum I/O operations per second (IOPS) for this volume. Example: 10000.
Possible values: 150 ≤ value ≤ 96000
List of volume mappings for this volume.
Possible values: 0 ≤ number of items ≤ 32
- VolumeMappings
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:mapped
The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[-0-9a-z_]+$/Examples:1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Host mapping schema.
- Host
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234
The NVMe target subsystem NQN (NVMe Qualified Name) that can be used for doing NVMe connect by the initiator.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234The NVMe namespace properties for a given volume mapping.
- Namespace
NVMe namespace ID that can be used to co-relate the discovered devices on host to the corresponding volume.
Possible values: 1 ≤ value ≤ 32
UUID of the NVMe namespace.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/
List of NVMe gateways.
Possible values: 0 ≤ number of items ≤ 10
- Gateways
IP address of the NVMe gateway node.
Possible values: 7 ≤ length ≤ 15, Value must match regular expression
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/Examples:192.168.3.4Port number of the NVMe gateway.
Possible values: 1 ≤ value ≤ 65535
Examples:22
The status of the volume resource. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:available
The reasons for the current status (if any).
Possible values: 0 ≤ number of items ≤ 10
- StatusReasons
A snake case string succinctly identifying the status reason.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/An explanation of the status reason.
Possible values: 10 ≤ length ≤ 1000, Value must match regular expression
/^[ -~\\n\\r\\t]*$/Examples:Specified resource not found
Link to documentation about this status reason.
Possible values: 10 ≤ length ≤ 8000
The source snapshot this volume was created from.
- SourceSnapshot
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
Status Code
The volume update request was accepted
An invalid volume patch was provided
A volume with the specified identifier could not be found
{ "capacity": 30, "snapshot_count": 5 }{ "capacity": 30, "snapshot_count": 5 }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
List all hosts
This request lists all hosts in the deployment. Hosts are objects representing the NVMe initiators that may be mapped to one or more volumes in the same deployment.
This request lists all hosts in the deployment. Hosts are objects representing the NVMe initiators that may be mapped to one or more volumes in the same deployment.
GET /hosts
(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) ListHosts(listHostsOptions *ListHostsOptions) (result *HostCollection, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) ListHostsWithContext(ctx context.Context, listHostsOptions *ListHostsOptions) (result *HostCollection, response *core.DetailedResponse, err error)Request
Instantiate the ListHostsOptions struct and set the fields to provide parameter values for the ListHosts method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Query Parameters
A server-provided token determining what resource to start the page on
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The number of resources to return on a page
Possible values: 1 ≤ value ≤ 1000
Default:
1000Example:
20Filters the collection to resources with a name property matching the exact specified name
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resource
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListHosts options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01A server-provided token determining what resource to start the page on.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The number of resources to return on a page.
Possible values: 1 ≤ value ≤ 1000
Default:
1000Examples:20Filters the collection to resources with a name property matching the exact specified name.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
curl -X GET --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' "${base_url}/hosts?start=r134-b274-678d-4dfb-8981-c71dd9d4daa5&limit=20&name=my-resource"
listHostsOptions := &ibmstoragecephasaserviceblockstorageapiv1.ListHostsOptions{ IBMAPIVersion: CreateMockDate("2025-02-01"), Limit: core.Int64Ptr(int64(20)), Name: core.StringPtr("my-resource"), } pager, err := ibmStorageCephAsAServiceBlockStorageApiService.NewHostsPager(listHostsOptions) if err != nil { panic(err) } var allResults []ibmstoragecephasaserviceblockstorageapiv1.Host for pager.HasNext() { nextPage, err := pager.GetNext() if err != nil { panic(err) } allResults = append(allResults, nextPage...) } b, _ := json.MarshalIndent(allResults, "", " ") fmt.Println(string(b))
Response
Collection of host objects
A link to the first page of resources
List of hosts
Possible values: 0 ≤ number of items ≤ 32
The maximum number of resources that can be returned by the request
Possible values: 1 ≤ value ≤ 1000
Example:
20The total number of resources across all pages Example: 132
Possible values: 1 ≤ value ≤ 1000
Example:
20A link to the next page of resources. This property is present for all pages except the last page
Collection of host objects.
A link to the first page of resources.
- First
The URL for a page of resources.
Possible values: 10 ≤ length ≤ 1000
List of hosts.
Possible values: 0 ≤ number of items ≤ 32
- Hosts
The date and time when the resource was created.
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234If the PSK is specified while creating the host then the value will be true.
Examples:trueList of volume mappings for this host.
Possible values: 0 ≤ number of items ≤ 1000
- VolumeMappings
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:mapped
The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[-0-9a-z_]+$/Examples:1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Host mapping schema.
- Host
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234
The NVMe target subsystem NQN (NVMe Qualified Name) that can be used for doing NVMe connect by the initiator.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234The NVMe namespace properties for a given volume mapping.
- Namespace
NVMe namespace ID that can be used to co-relate the discovered devices on host to the corresponding volume.
Possible values: 1 ≤ value ≤ 32
UUID of the NVMe namespace.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/
List of NVMe gateways.
Possible values: 0 ≤ number of items ≤ 10
- Gateways
IP address of the NVMe gateway node.
Possible values: 7 ≤ length ≤ 15, Value must match regular expression
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/Examples:192.168.3.4Port number of the NVMe gateway.
Possible values: 1 ≤ value ≤ 65535
Examples:22
The maximum number of resources that can be returned by the request.
Possible values: 1 ≤ value ≤ 1000
Examples:20A link to the next page of resources. This property is present for all pages except the last page.
- Next
The URL for a page of resources.
Possible values: 10 ≤ length ≤ 1000
The total number of resources across all pages Example: 132.
Possible values: 1 ≤ value ≤ 1000
Examples:20
Status Code
The Hosts were retrieved successfully
No Sample Response
Create a host
This request creates a new host from a host prototype object. The prototype object contains the information necessary to provision the new host which can also be mapped to one or more volumes.
This request creates a new host from a host prototype object. The prototype object contains the information necessary to provision the new host which can also be mapped to one or more volumes.
POST /hosts
(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) CreateHost(createHostOptions *CreateHostOptions) (result *HostSummary, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) CreateHostWithContext(ctx context.Context, createHostOptions *CreateHostOptions) (result *HostSummary, response *core.DetailedResponse, err error)Request
Instantiate the CreateHostOptions struct and set the fields to provide parameter values for the CreateHost method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Create host request body
{
"name": "my-host",
"nqn": "nqn.2014-06.org:1234",
"psk": "NVMeTLSkey-1:01:5CBxDU8ejK+PrqIjTau0yDHnBV2CdfvP6hGmqnPdKhJ9tfi2:"
}The name for this host. The name must not be used by another host. If unspecified, the name will be a hyphenated list of randomly-selected words.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$Example:
my-hostThe NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
^nqn\.\d{4}-\d{2}\.[a-z0-9-]+(?:\.[a-z0-9-]+)*:[a-zA-Z0-9.\-:]+$Example:
nqn.2014-06.org:1234Transport Layer Security pre-shared key ciphersuites (TLS-PSK) is a set of cryptographic protocols that provide secure communication based on pre-shared keys (PSKs).
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
^NVMeTLSkey-1:[0-2]{2}:[a-zA-Z0-9+/=]+:$Example:
NVMeTLSkey-1:01:5CBxDU8ejK+PrqIjTau0yDHnBV2CdfvP6hGmqnPdKhJ9tfi2:List of volume IDs to be mapped to the host
Possible values: 0 ≤ number of items ≤ 1000
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateHost options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The name for this host. The name must not be used by another host. If unspecified, the name will be a hyphenated list of randomly-selected words.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$/Examples:my-host
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234Transport Layer Security pre-shared key ciphersuites (TLS-PSK) is a set of cryptographic protocols that provide secure communication based on pre-shared keys (PSKs).
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/^NVMeTLSkey-1:[0-2]{2}:[a-zA-Z0-9+\/=]+:$/Examples:NVMeTLSkey-1:01:5CBxDU8ejK+PrqIjTau0yDHnBV2CdfvP6hGmqnPdKhJ9tfi2:List of volume IDs to be mapped to the host.
Possible values: 0 ≤ number of items ≤ 1000
- VolumeMappings
Volume identifier.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X POST --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' --header 'Content-Type: application/json' --data '{ "name": "my-host", "nqn": "nqn.2014-06.org:1234" }' "${base_url}/hosts"
createHostOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewCreateHostOptions( CreateMockDate("2025-02-01"), "my-host", "nqn.2014-06.org:1234", ) hostSummary, response, err := ibmStorageCephAsAServiceBlockStorageApiService.CreateHost(createHostOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(hostSummary, "", " ") fmt.Println(string(b))
Response
Host creation response
The date and time when the resource was created
Possible values: 10 ≤ length ≤ 64
The unique identifier for this resource
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resourceThe NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
^nqn\.\d{4}-\d{2}\.[a-z0-9-]+(?:\.[a-z0-9-]+)*:[a-zA-Z0-9.\-:]+$Example:
nqn.2014-06.org:1234If the PSK is specified while creating the host then the value will be true.
Example:
trueList of volume mappings for this host
Possible values: 0 ≤ number of items ≤ 1000
Host creation response.
The date and time when the resource was created.
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234If the PSK is specified while creating the host then the value will be true.
Examples:trueList of volume mappings for this host.
Possible values: 0 ≤ number of items ≤ 1000
- VolumeMappings
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:pending
The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[-0-9a-z_]+$/Examples:1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Host mapping schema.
- Host
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234
Status Code
Host creation request has been accepted
An invalid host object was provided
{ "nqn": "nqn.2014-06.org:1234", "psk_enabled": true }{ "nqn": "nqn.2014-06.org:1234", "psk_enabled": true }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
Delete a Host
This request deletes a host. For this request to succeed, the host must not be mapped to any volumes.
This request deletes a host. For this request to succeed, the host must not be mapped to any volumes.
DELETE /hosts/{id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteHost(deleteHostOptions *DeleteHostOptions) (response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteHostWithContext(ctx context.Context, deleteHostOptions *DeleteHostOptions) (response *core.DetailedResponse, err error)Request
Instantiate the DeleteHostOptions struct and set the fields to provide parameter values for the DeleteHost method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The Host identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteHost options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The Host identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X DELETE --location --header "Authorization: Bearer IAM_TOKEN" --header 'IBM-API-Version: "2025-02-01"' "${base_url}/hosts/ID"
deleteHostOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewDeleteHostOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", ) response, err := ibmStorageCephAsAServiceBlockStorageApiService.DeleteHost(deleteHostOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteHost(): %d\n", response.StatusCode) }
Response
Status Code
The host deletion request has been accepted
Host with specified id not found
Host cannot be deleted as it is mapped to one or more Volumes
{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
Retrieve a Host
This request retrieves a host specified by the identifier in the URL
This request retrieves a host specified by the identifier in the URL.
GET /hosts/{id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) GetHost(getHostOptions *GetHostOptions) (result *Host, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) GetHostWithContext(ctx context.Context, getHostOptions *GetHostOptions) (result *Host, response *core.DetailedResponse, err error)Request
Instantiate the GetHostOptions struct and set the fields to provide parameter values for the GetHost method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The Host identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetHost options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The Host identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X GET --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' "${base_url}/hosts/ID"
getHostOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewGetHostOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", ) host, response, err := ibmStorageCephAsAServiceBlockStorageApiService.GetHost(getHostOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(host, "", " ") fmt.Println(string(b))
Response
Host Schema
The date and time when the resource was created
Possible values: 10 ≤ length ≤ 64
The unique identifier for this resource
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resourceThe NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
^nqn\.\d{4}-\d{2}\.[a-z0-9-]+(?:\.[a-z0-9-]+)*:[a-zA-Z0-9.\-:]+$Example:
nqn.2014-06.org:1234If the PSK is specified while creating the host then the value will be true.
Example:
trueList of volume mappings for this host
Possible values: 0 ≤ number of items ≤ 1000
Host Schema.
The date and time when the resource was created.
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234If the PSK is specified while creating the host then the value will be true.
Examples:trueList of volume mappings for this host.
Possible values: 0 ≤ number of items ≤ 1000
- VolumeMappings
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:mapped
The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[-0-9a-z_]+$/Examples:1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Host mapping schema.
- Host
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234
The NVMe target subsystem NQN (NVMe Qualified Name) that can be used for doing NVMe connect by the initiator.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234The NVMe namespace properties for a given volume mapping.
- Namespace
NVMe namespace ID that can be used to co-relate the discovered devices on host to the corresponding volume.
Possible values: 1 ≤ value ≤ 32
UUID of the NVMe namespace.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/
List of NVMe gateways.
Possible values: 0 ≤ number of items ≤ 10
- Gateways
IP address of the NVMe gateway node.
Possible values: 7 ≤ length ≤ 15, Value must match regular expression
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/Examples:192.168.3.4Port number of the NVMe gateway.
Possible values: 1 ≤ value ≤ 65535
Examples:22
Status Code
The host was retrieved successfully
A host with the specified identifier could not be found
{ "nqn": "nqn.2014-06.org:1234", "psk_enabled": true }{ "nqn": "nqn.2014-06.org:1234", "psk_enabled": true }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
Update a given Host
This request updates a Host with the information in a provided host patch object. The host patch object is structured in the same way as a retrieved host and contains only the information to be updated.
This request updates a Host with the information in a provided host patch object. The host patch object is structured in the same way as a retrieved host and contains only the information to be updated.
PATCH /hosts/{id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) UpdateHost(updateHostOptions *UpdateHostOptions) (result *Host, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) UpdateHostWithContext(ctx context.Context, updateHostOptions *UpdateHostOptions) (result *Host, response *core.DetailedResponse, err error)Request
Instantiate the UpdateHostOptions struct and set the fields to provide parameter values for the UpdateHost method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The Host identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
Host Patch body
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resource
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateHost options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The Host identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5Host Patch body.
curl -X PATCH --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' --header 'Content-Type: application/merge-patch+json' --data '' "${base_url}/hosts/ID"
hostPatchModel := &ibmstoragecephasaserviceblockstorageapiv1.HostPatch{ } hostPatchModelAsPatch, asPatchErr := hostPatchModel.AsPatch() Expect(asPatchErr).To(BeNil()) updateHostOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewUpdateHostOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", hostPatchModelAsPatch, ) host, response, err := ibmStorageCephAsAServiceBlockStorageApiService.UpdateHost(updateHostOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(host, "", " ") fmt.Println(string(b))
Response
Host Schema
The date and time when the resource was created
Possible values: 10 ≤ length ≤ 64
The unique identifier for this resource
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resourceThe NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
^nqn\.\d{4}-\d{2}\.[a-z0-9-]+(?:\.[a-z0-9-]+)*:[a-zA-Z0-9.\-:]+$Example:
nqn.2014-06.org:1234If the PSK is specified while creating the host then the value will be true.
Example:
trueList of volume mappings for this host
Possible values: 0 ≤ number of items ≤ 1000
Host Schema.
The date and time when the resource was created.
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234If the PSK is specified while creating the host then the value will be true.
Examples:trueList of volume mappings for this host.
Possible values: 0 ≤ number of items ≤ 1000
- VolumeMappings
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:mapped
The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[-0-9a-z_]+$/Examples:1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Host mapping schema.
- Host
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234
The NVMe target subsystem NQN (NVMe Qualified Name) that can be used for doing NVMe connect by the initiator.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234The NVMe namespace properties for a given volume mapping.
- Namespace
NVMe namespace ID that can be used to co-relate the discovered devices on host to the corresponding volume.
Possible values: 1 ≤ value ≤ 32
UUID of the NVMe namespace.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/
List of NVMe gateways.
Possible values: 0 ≤ number of items ≤ 10
- Gateways
IP address of the NVMe gateway node.
Possible values: 7 ≤ length ≤ 15, Value must match regular expression
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/Examples:192.168.3.4Port number of the NVMe gateway.
Possible values: 1 ≤ value ≤ 65535
Examples:22
Status Code
The Host was updated successfully
An invalid Host patch was provided
A Host with the specified identifier could not be found
{ "nqn": "nqn.2014-06.org:1234", "psk_enabled": true }{ "nqn": "nqn.2014-06.org:1234", "psk_enabled": true }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
Deletes all the volume mappings for a given host
This request deletes all volume mappings for a host
This request deletes all volume mappings for a host.
DELETE /hosts/{id}/volume_mappings(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteHostMappings(deleteHostMappingsOptions *DeleteHostMappingsOptions) (response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteHostMappingsWithContext(ctx context.Context, deleteHostMappingsOptions *DeleteHostMappingsOptions) (response *core.DetailedResponse, err error)Request
Instantiate the DeleteHostMappingsOptions struct and set the fields to provide parameter values for the DeleteHostMappings method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The Host identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteHostMappings options.
The Host identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01
curl -X DELETE --location --header "Authorization: Bearer IAM_TOKEN" --header 'IBM-API-Version: "2025-02-01"' "${base_url}/hosts/ID/volume_mappings"
deleteHostMappingsOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewDeleteHostMappingsOptions( "r134-b274-678d-4dfb-8981-c71dd9d4daa5", CreateMockDate("2025-02-01"), ) response, err := ibmStorageCephAsAServiceBlockStorageApiService.DeleteHostMappings(deleteHostMappingsOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteHostMappings(): %d\n", response.StatusCode) }
Response
Status Code
The deletion request was accepted
The specified host ID could not be found
{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
List all volume mappings for a host
This request lists volume mappings for a host.
This request lists volume mappings for a host.
GET /hosts/{id}/volume_mappings(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) ListVolumeMappings(listVolumeMappingsOptions *ListVolumeMappingsOptions) (result *VolumeMappingCollection, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) ListVolumeMappingsWithContext(ctx context.Context, listVolumeMappingsOptions *ListVolumeMappingsOptions) (result *VolumeMappingCollection, response *core.DetailedResponse, err error)Request
Instantiate the ListVolumeMappingsOptions struct and set the fields to provide parameter values for the ListVolumeMappings method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The Host identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
Query Parameters
A server-provided token determining what resource to start the page on
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The number of resources to return on a page
Possible values: 1 ≤ value ≤ 1000
Default:
1000Example:
20Filters the collection of resources with a name property matching the exact specified name
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resource
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListVolumeMappings options.
The Host identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01A server-provided token determining what resource to start the page on.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The number of resources to return on a page.
Possible values: 1 ≤ value ≤ 1000
Default:
1000Examples:20Filters the collection of resources with a name property matching the exact specified name.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
curl -X GET --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' "${base_url}/hosts/ID/volume_mappings?start=r134-b274-678d-4dfb-8981-c71dd9d4daa5&limit=20&name=my-resource"
listVolumeMappingsOptions := &ibmstoragecephasaserviceblockstorageapiv1.ListVolumeMappingsOptions{ ID: core.StringPtr("r134-b274-678d-4dfb-8981-c71dd9d4daa5"), IBMAPIVersion: CreateMockDate("2025-02-01"), Limit: core.Int64Ptr(int64(20)), Name: core.StringPtr("my-resource"), } pager, err := ibmStorageCephAsAServiceBlockStorageApiService.NewVolumeMappingsPager(listVolumeMappingsOptions) if err != nil { panic(err) } var allResults []ibmstoragecephasaserviceblockstorageapiv1.VolumeMapping for pager.HasNext() { nextPage, err := pager.GetNext() if err != nil { panic(err) } allResults = append(allResults, nextPage...) } b, _ := json.MarshalIndent(allResults, "", " ") fmt.Println(string(b))
Response
Collection of volume mappings for a host
A link to the first page of resources
List of volume_mappings
Possible values: 0 ≤ number of items ≤ 128
The maximum number of resources that can be returned by the request
Possible values: 1 ≤ value ≤ 1000
Example:
20The total number of resources across all pages Example: 132
Possible values: 1 ≤ value ≤ 1000
Example:
20A link to the next page of resources. This property is present for all pages except the last page
Collection of volume mappings for a host.
A link to the first page of resources.
- First
The URL for a page of resources.
Possible values: 10 ≤ length ≤ 1000
List of volume_mappings.
Possible values: 0 ≤ number of items ≤ 128
- VolumeMappings
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:mapped
The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[-0-9a-z_]+$/Examples:1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Host mapping schema.
- Host
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234
The NVMe target subsystem NQN (NVMe Qualified Name) that can be used for doing NVMe connect by the initiator.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234The NVMe namespace properties for a given volume mapping.
- Namespace
NVMe namespace ID that can be used to co-relate the discovered devices on host to the corresponding volume.
Possible values: 1 ≤ value ≤ 32
UUID of the NVMe namespace.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/
List of NVMe gateways.
Possible values: 0 ≤ number of items ≤ 10
- Gateways
IP address of the NVMe gateway node.
Possible values: 7 ≤ length ≤ 15, Value must match regular expression
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/Examples:192.168.3.4Port number of the NVMe gateway.
Possible values: 1 ≤ value ≤ 65535
Examples:22
The maximum number of resources that can be returned by the request.
Possible values: 1 ≤ value ≤ 1000
Examples:20A link to the next page of resources. This property is present for all pages except the last page.
- Next
The URL for a page of resources.
Possible values: 10 ≤ length ≤ 1000
The total number of resources across all pages Example: 132.
Possible values: 1 ≤ value ≤ 1000
Examples:20
Status Code
The volume mappings were retrieved successfully
No Sample Response
Create a Volume mapping for a host
This request creates a new volume mapping for a given host.
This request creates a new volume mapping for a given host.
POST /hosts/{id}/volume_mappings(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) CreateVolumeMapping(createVolumeMappingOptions *CreateVolumeMappingOptions) (result *VolumeMappingReference, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) CreateVolumeMappingWithContext(ctx context.Context, createVolumeMappingOptions *CreateVolumeMappingOptions) (result *VolumeMappingReference, response *core.DetailedResponse, err error)Request
Instantiate the CreateVolumeMappingOptions struct and set the fields to provide parameter values for the CreateVolumeMapping method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The Host identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
Volume mapping request
Volume identifier
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateVolumeMapping options.
The Host identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01Volume identifier.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X POST --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' --header 'Content-Type: application/json' --data '{ "volume": { "id": "r134-b274-678d-4dfb-8981-c71dd9d4daa5" } }' "${base_url}/hosts/ID/volume_mappings"
volumeIdentityModel := &ibmstoragecephasaserviceblockstorageapiv1.VolumeIdentity{ ID: core.StringPtr("r134-b274-678d-4dfb-8981-c71dd9d4daa5"), } createVolumeMappingOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewCreateVolumeMappingOptions( "r134-b274-678d-4dfb-8981-c71dd9d4daa5", CreateMockDate("2025-02-01"), volumeIdentityModel, ) volumeMappingReference, response, err := ibmStorageCephAsAServiceBlockStorageApiService.CreateVolumeMapping(createVolumeMappingOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(volumeMappingReference, "", " ") fmt.Println(string(b))
Response
Schema for a volume mapping to a host in pending state
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$Example:
pendingThe URL for this resource
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[-0-9a-z_]+$Example:
1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference
Host mapping schema
Schema for a volume mapping to a host in pending state.
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:pending
The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[-0-9a-z_]+$/Examples:1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Host mapping schema.
- Host
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234
Status Code
Volume mapping request has been accepted. This is an asynchronous operation and its progress can be monitored using the "status".
An invalid volume mapping object was provided
{ "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45" }{ "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45" }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
Deletes the volume mapping
This request deletes the volume mapping
This request deletes the volume mapping.
DELETE /hosts/{id}/volume_mappings/{volume_mapping_id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteHostMapping(deleteHostMappingOptions *DeleteHostMappingOptions) (response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteHostMappingWithContext(ctx context.Context, deleteHostMappingOptions *DeleteHostMappingOptions) (response *core.DetailedResponse, err error)Request
Instantiate the DeleteHostMappingOptions struct and set the fields to provide parameter values for the DeleteHostMapping method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The host identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The Volume mapping identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteHostMapping options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The host identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The Volume mapping identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X DELETE --location --header "Authorization: Bearer IAM_TOKEN" --header 'IBM-API-Version: "2025-02-01"' "${base_url}/hosts/ID/volume_mappings/${volume_mapping_id}"
deleteHostMappingOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewDeleteHostMappingOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", "r134-b274-678d-4dfb-8981-c71dd9d4daa5", ) response, err := ibmStorageCephAsAServiceBlockStorageApiService.DeleteHostMapping(deleteHostMappingOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteHostMapping(): %d\n", response.StatusCode) }
Response
Status Code
The deletion request was accepted
The volume mapping or host with the specified identifier could not be found
{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
Retrieve a volume mapping
This request retrieves a single volume mapping specified by the identifier in the URL
This request retrieves a single volume mapping specified by the identifier in the URL.
GET /hosts/{id}/volume_mappings/{volume_mapping_id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) GetVolumeMapping(getVolumeMappingOptions *GetVolumeMappingOptions) (result *VolumeMapping, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) GetVolumeMappingWithContext(ctx context.Context, getVolumeMappingOptions *GetVolumeMappingOptions) (result *VolumeMapping, response *core.DetailedResponse, err error)Request
Instantiate the GetVolumeMappingOptions struct and set the fields to provide parameter values for the GetVolumeMapping method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The host identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The volume mapping identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetVolumeMapping options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The host identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The volume mapping identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X GET --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' "${base_url}/hosts/ID/volume_mappings/${volume_mapping_id}"
getVolumeMappingOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewGetVolumeMappingOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", "r134-b274-678d-4dfb-8981-c71dd9d4daa5", ) volumeMapping, response, err := ibmStorageCephAsAServiceBlockStorageApiService.GetVolumeMapping(getVolumeMappingOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(volumeMapping, "", " ") fmt.Println(string(b))
Response
Volume mapping object depicting the mapping between a volume and a host
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$Example:
mappedThe URL for this resource
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[-0-9a-z_]+$Example:
1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference
Host mapping schema
List of NVMe gateways
Possible values: 0 ≤ number of items ≤ 10
The NVMe target subsystem NQN (NVMe Qualified Name) that can be used for doing NVMe connect by the initiator
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
^nqn\.\d{4}-\d{2}\.[a-z0-9-]+(?:\.[a-z0-9-]+)*:[a-zA-Z0-9.\-:]+$Example:
nqn.2014-06.org:1234The NVMe namespace properties for a given volume mapping
Volume mapping object depicting the mapping between a volume and a host.
The status of the volume mapping. The enumerated values for this property will expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the unexpected property value was encountered.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:mapped
The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
Unique identifier of the mapping.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[-0-9a-z_]+$/Examples:1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45The volume reference.
- Volume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Host mapping schema.
- Host
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The NQN (NVMe Qualified Name) as configured on the initiator (compute/host) accessing the storage.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234
The NVMe target subsystem NQN (NVMe Qualified Name) that can be used for doing NVMe connect by the initiator.
Possible values: 16 ≤ length ≤ 223, Value must match regular expression
/^nqn\\.\\d{4}-\\d{2}\\.[a-z0-9-]+(?:\\.[a-z0-9-]+)*:[a-zA-Z0-9.\\-:]+$/Examples:nqn.2014-06.org:1234The NVMe namespace properties for a given volume mapping.
- Namespace
NVMe namespace ID that can be used to co-relate the discovered devices on host to the corresponding volume.
Possible values: 1 ≤ value ≤ 32
UUID of the NVMe namespace.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/
List of NVMe gateways.
Possible values: 0 ≤ number of items ≤ 10
- Gateways
IP address of the NVMe gateway node.
Possible values: 7 ≤ length ≤ 15, Value must match regular expression
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/Examples:192.168.3.4Port number of the NVMe gateway.
Possible values: 1 ≤ value ≤ 65535
Examples:22
Status Code
The volume mapping was retrieved successfully
A volume mapping with the specified identifier could not be found
{ "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45", "subsystem_nqn": "nqn.2014-06.org:1234" }{ "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5-1a6b7274-678d-4dfb-8981-c71dd9d4da45", "subsystem_nqn": "nqn.2014-06.org:1234" }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }{ "trace": "659f5fa6-98bc-4f3f-a3ff-8c953223c6c1", "status_code": 400, "errors": [ { "code": "user_credential_invalid", "more_info": "https://cloud.ibm.com/docs/cephaas#user_credential_invalid", "message": "The user lacks valid authentication credential for the target resource", "target": { "name": "nqn", "type": "field", "value": "value" } } ] }
Delete a filtered collection of snapshots
This request deletes snapshots that match the specified filter.
This request deletes snapshots that match the specified filter.
DELETE /snapshots
(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteSnapshots(deleteSnapshotsOptions *DeleteSnapshotsOptions) (response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteSnapshotsWithContext(ctx context.Context, deleteSnapshotsOptions *DeleteSnapshotsOptions) (response *core.DetailedResponse, err error)Request
Instantiate the DeleteSnapshotsOptions struct and set the fields to provide parameter values for the DeleteSnapshots method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Query Parameters
Filters the collection to resources with a source_volume.id property matching the specified identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5Filters the collection to resources with a source_volume_group.id property matching the specified identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteSnapshots options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01Filters the collection to resources with a source_volume.id property matching the specified identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5Filters the collection to resources with a source_volume_group.id property matching the specified identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X DELETE --location --header "Authorization: Bearer IAM_TOKEN" --header 'IBM-API-Version: "2025-02-01"' "${base_url}/snapshots?source_volume.id=r134-b274-678d-4dfb-8981-c71dd9d4daa5&source_volume_group.id=r134-b274-678d-4dfb-8981-c71dd9d4daa5"
deleteSnapshotsOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewDeleteSnapshotsOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", "r134-b274-678d-4dfb-8981-c71dd9d4daa5", ) response, err := ibmStorageCephAsAServiceBlockStorageApiService.DeleteSnapshots(deleteSnapshotsOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteSnapshots(): %d\n", response.StatusCode) }
List all Snapshots
This request lists snapshots in the deployment. A snapshot preserves the data of a volume at the time the snapshot is created.
This request lists snapshots in the deployment. A snapshot preserves the data of a volume at the time the snapshot is created.
GET /snapshots
(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) ListSnapshots(listSnapshotsOptions *ListSnapshotsOptions) (result *SnapshotCollection, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) ListSnapshotsWithContext(ctx context.Context, listSnapshotsOptions *ListSnapshotsOptions) (result *SnapshotCollection, response *core.DetailedResponse, err error)Request
Instantiate the ListSnapshotsOptions struct and set the fields to provide parameter values for the ListSnapshots method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Query Parameters
A server-provided token determining what resource to start the page on
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The number of resources to return on a page
Possible values: 1 ≤ value ≤ 1000
Default:
1000Example:
20Filters the collection of resources with a name property matching the exact specified name
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resourceFilters the collection to resources with a source_volume.id property matching the specified identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5Filters the collection to resources with a source_volume_group.id property matching the specified identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListSnapshots options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01A server-provided token determining what resource to start the page on.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The number of resources to return on a page.
Possible values: 1 ≤ value ≤ 1000
Default:
1000Examples:20Filters the collection of resources with a name property matching the exact specified name.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
Filters the collection to resources with a source_volume.id property matching the specified identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5Filters the collection to resources with a source_volume_group.id property matching the specified identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X GET --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' "${base_url}/snapshots?start=r134-b274-678d-4dfb-8981-c71dd9d4daa5&limit=20&name=my-resource&source_volume.id=r134-b274-678d-4dfb-8981-c71dd9d4daa5&source_volume_group.id=r134-b274-678d-4dfb-8981-c71dd9d4daa5"
listSnapshotsOptions := &ibmstoragecephasaserviceblockstorageapiv1.ListSnapshotsOptions{ IBMAPIVersion: CreateMockDate("2025-02-01"), Limit: core.Int64Ptr(int64(20)), Name: core.StringPtr("my-resource"), SourceVolumeID: core.StringPtr("r134-b274-678d-4dfb-8981-c71dd9d4daa5"), SourceVolumeGroupID: core.StringPtr("r134-b274-678d-4dfb-8981-c71dd9d4daa5"), } pager, err := ibmStorageCephAsAServiceBlockStorageApiService.NewSnapshotsPager(listSnapshotsOptions) if err != nil { panic(err) } var allResults []ibmstoragecephasaserviceblockstorageapiv1.Snapshot for pager.HasNext() { nextPage, err := pager.GetNext() if err != nil { panic(err) } allResults = append(allResults, nextPage...) } b, _ := json.MarshalIndent(allResults, "", " ") fmt.Println(string(b))
Response
A page of snapshots
Collection of snapshots
Possible values: 0 ≤ number of items ≤ 50
A link to the first page of resources
The maximum number of resources that can be returned by the request
Possible values: 1 ≤ value ≤ 1000
Example:
20The total number of resources across all pages Example: 132
Possible values: 1 ≤ value ≤ 1000
Example:
20A link to the next page of resources. This property is present for all pages except the last page
A page of snapshots.
Collection of snapshots.
Possible values: 0 ≤ number of items ≤ 50
- Snapshots
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The date and time when the resource was created.
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/The lifecycle state of this snapshot.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:stable
The size of the snapshot (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Examples:30The capacity of the source volume.
Possible values: 1 ≤ value ≤ 32000
Examples:30Boolean value of snapshot can be deletable or not.
Examples:trueThe source volume this snapshot was created from (may be deleted).
- SourceVolume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/
The source volume group ID this volume group snapshot was created from.
- SourceVolumeGroup
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/
A link to the first page of resources.
- First
The URL for a page of resources.
Possible values: 10 ≤ length ≤ 1000
The maximum number of resources that can be returned by the request.
Possible values: 1 ≤ value ≤ 1000
Examples:20A link to the next page of resources. This property is present for all pages except the last page.
- Next
The URL for a page of resources.
Possible values: 10 ≤ length ≤ 1000
The total number of resources across all pages Example: 132.
Possible values: 1 ≤ value ≤ 1000
Examples:20
Status Code
The snapshots were retrieved successfully
No Sample Response
Create a Snapshot
This request creates a new snapshot from a snapshot prototype object.
The prototype object is structured in the same way as a retrieved snapshot,
and contains the information necessary to provision the new snapshot.
Note: After snapshot creation, the inital size is reported as 1 GiB by default.
This request creates a new snapshot from a snapshot prototype object. The prototype object is structured in the same way as a retrieved snapshot, and contains the information necessary to provision the new snapshot.
Note: After snapshot creation, the inital size is reported as 1 GiB by default.
POST /snapshots
(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) CreateSnapshot(createSnapshotOptions *CreateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) CreateSnapshotWithContext(ctx context.Context, createSnapshotOptions *CreateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error)Request
Instantiate the CreateSnapshotOptions struct and set the fields to provide parameter values for the CreateSnapshot method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Snapshot Template
{
"name": "my-snapshot"
}The source volume this snapshot was created from (may be deleted).
The name for this snapshot. The name must not be used by another snapshot. If unspecified, the name will be a hyphenated list of randomly-selected words.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$Example:
my-snapshotThe source volume group ID this volume group snapshot was created from.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateSnapshot options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The source volume this snapshot was created from (may be deleted).
- SourceVolume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/
The name for this snapshot. The name must not be used by another snapshot. If unspecified, the name will be a hyphenated list of randomly-selected words.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$/Examples:my-snapshot
The source volume group ID this volume group snapshot was created from.
- SourceVolumeGroup
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/
curl -X POST --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' --header 'Content-Type: application/json' --data '{ "source_volume": { "id": "r134-b274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-resource", "resource_type": "testString" } }' "${base_url}/snapshots"
sourceVolumeModel := &ibmstoragecephasaserviceblockstorageapiv1.SourceVolume{ ID: core.StringPtr("r134-b274-678d-4dfb-8981-c71dd9d4daa5"), Name: core.StringPtr("my-resource"), ResourceType: core.StringPtr("testString"), } createSnapshotOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewCreateSnapshotOptions( CreateMockDate("2025-02-01"), sourceVolumeModel, ) snapshot, response, err := ibmStorageCephAsAServiceBlockStorageApiService.CreateSnapshot(createSnapshotOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(snapshot, "", " ") fmt.Println(string(b))
Response
The snapshot object
The unique identifier for this resource
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resourceThe date and time when the resource was created
Possible values: 10 ≤ length ≤ 64
The type of this resource
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$The lifecycle state of this snapshot
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$Example:
stableThe size of the snapshot (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Example:
30The capacity of the source volume.
Possible values: 1 ≤ value ≤ 32000
Example:
30Boolean value of snapshot can be deletable or not.
Example:
trueThe source volume this snapshot was created from (may be deleted).
The source volume group ID this volume group snapshot was created from.
The snapshot object.
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The date and time when the resource was created.
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/The lifecycle state of this snapshot.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:stable
The size of the snapshot (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Examples:30The capacity of the source volume.
Possible values: 1 ≤ value ≤ 32000
Examples:30Boolean value of snapshot can be deletable or not.
Examples:trueThe source volume this snapshot was created from (may be deleted).
- SourceVolume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/
The source volume group ID this volume group snapshot was created from.
- SourceVolumeGroup
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/
Status Code
Snapshot creation request has been accepted
An invalid snapshot prototype object was provided.
{ "lifecycle_state": "stable", "size": 30, "minimum_capacity": 30, "deletable": true }{ "lifecycle_state": "stable", "size": 30, "minimum_capacity": 30, "deletable": true }
Delete a snapshot
This request deletes a snapshot.
This request deletes a snapshot.
DELETE /snapshots/{id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteSnapshot(deleteSnapshotOptions *DeleteSnapshotOptions) (response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) DeleteSnapshotWithContext(ctx context.Context, deleteSnapshotOptions *DeleteSnapshotOptions) (response *core.DetailedResponse, err error)Request
Instantiate the DeleteSnapshotOptions struct and set the fields to provide parameter values for the DeleteSnapshot method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The snapshot identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteSnapshot options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The snapshot identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X DELETE --location --header "Authorization: Bearer IAM_TOKEN" --header 'IBM-API-Version: "2025-02-01"' "${base_url}/snapshots/ID"
deleteSnapshotOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewDeleteSnapshotOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", ) response, err := ibmStorageCephAsAServiceBlockStorageApiService.DeleteSnapshot(deleteSnapshotOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteSnapshot(): %d\n", response.StatusCode) }
Retrieve a snapshot
This request retrieves a single snapshot specified by the identifier in the URL.
This request retrieves a single snapshot specified by the identifier in the URL.
GET /snapshots/{id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) GetSnapshot(getSnapshotOptions *GetSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) GetSnapshotWithContext(ctx context.Context, getSnapshotOptions *GetSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error)Request
Instantiate the GetSnapshotOptions struct and set the fields to provide parameter values for the GetSnapshot method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The snapshot identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetSnapshot options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The snapshot identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5
curl -X GET --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' "${base_url}/snapshots/ID"
getSnapshotOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewGetSnapshotOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", ) snapshot, response, err := ibmStorageCephAsAServiceBlockStorageApiService.GetSnapshot(getSnapshotOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(snapshot, "", " ") fmt.Println(string(b))
Response
The snapshot object
The unique identifier for this resource
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resourceThe date and time when the resource was created
Possible values: 10 ≤ length ≤ 64
The type of this resource
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$The lifecycle state of this snapshot
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$Example:
stableThe size of the snapshot (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Example:
30The capacity of the source volume.
Possible values: 1 ≤ value ≤ 32000
Example:
30Boolean value of snapshot can be deletable or not.
Example:
trueThe source volume this snapshot was created from (may be deleted).
The source volume group ID this volume group snapshot was created from.
The snapshot object.
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The date and time when the resource was created.
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/The lifecycle state of this snapshot.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:stable
The size of the snapshot (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Examples:30The capacity of the source volume.
Possible values: 1 ≤ value ≤ 32000
Examples:30Boolean value of snapshot can be deletable or not.
Examples:trueThe source volume this snapshot was created from (may be deleted).
- SourceVolume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/
The source volume group ID this volume group snapshot was created from.
- SourceVolumeGroup
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/
Status Code
The snapshot was retrieved successfully
A snapshot with the specified identifier could not be found.
{ "lifecycle_state": "stable", "size": 30, "minimum_capacity": 30, "deletable": true }{ "lifecycle_state": "stable", "size": 30, "minimum_capacity": 30, "deletable": true }
Update a snapshot
This request updates a snapshot with the information in a provided snapshot patch.
This request updates a snapshot with the information in a provided snapshot patch.
PATCH /snapshots/{id}(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) UpdateSnapshot(updateSnapshotOptions *UpdateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error)(ibmStorageCephAsAServiceBlockStorageApi *IbmStorageCephAsAServiceBlockStorageApiV1) UpdateSnapshotWithContext(ctx context.Context, updateSnapshotOptions *UpdateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error)Request
Instantiate the UpdateSnapshotOptions struct and set the fields to provide parameter values for the UpdateSnapshot method.
Custom Headers
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Possible values: length = 10, Value must match regular expression
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Example:
2025-02-01
Path Parameters
The snapshot identifier
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5
The name for this snapshot. The name must not be used by another snapshot.
{
"name": "my-snapshot"
}The name for this snapshot. The name must not be used by another snapshot.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^-?([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$Example:
my-snapshot
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateSnapshot options.
The API version, in format YYYY-MM-DD. For the API behavior documented here, specify any date from 2025-02-01 to current date in UTC time zone.
Examples:2025-02-01The snapshot identifier.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The name for this snapshot. The name must not be used by another snapshot.
curl -X PATCH --location --header "Authorization: Bearer IAM_TOKEN" --header 'Accept: application/json' --header 'IBM-API-Version: "2025-02-01"' --header 'Content-Type: application/merge-patch+json' --data '' "${base_url}/snapshots/ID"
snapshotPatchModel := &ibmstoragecephasaserviceblockstorageapiv1.SnapshotPatch{ } snapshotPatchModelAsPatch, asPatchErr := snapshotPatchModel.AsPatch() Expect(asPatchErr).To(BeNil()) updateSnapshotOptions := ibmStorageCephAsAServiceBlockStorageApiService.NewUpdateSnapshotOptions( CreateMockDate("2025-02-01"), "r134-b274-678d-4dfb-8981-c71dd9d4daa5", snapshotPatchModelAsPatch, ) snapshot, response, err := ibmStorageCephAsAServiceBlockStorageApiService.UpdateSnapshot(updateSnapshotOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(snapshot, "", " ") fmt.Println(string(b))
Response
The snapshot object
The unique identifier for this resource
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
^[-0-9a-z_]+$Example:
r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
^[a-z][a-z0-9]*(-[a-z0-9]+)*$Example:
my-resourceThe date and time when the resource was created
Possible values: 10 ≤ length ≤ 64
The type of this resource
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$The lifecycle state of this snapshot
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
^[a-z][a-z0-9]*(_[a-z0-9]+)*$Example:
stableThe size of the snapshot (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Example:
30The capacity of the source volume.
Possible values: 1 ≤ value ≤ 32000
Example:
30Boolean value of snapshot can be deletable or not.
Example:
trueThe source volume this snapshot was created from (may be deleted).
The source volume group ID this volume group snapshot was created from.
The snapshot object.
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The URL for this resource.
Possible values: 10 ≤ length ≤ 1000
The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The date and time when the resource was created.
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/The lifecycle state of this snapshot.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/Examples:stable
The size of the snapshot (in gigabytes).
Possible values: 1 ≤ value ≤ 32000
Examples:30The capacity of the source volume.
Possible values: 1 ≤ value ≤ 32000
Examples:30Boolean value of snapshot can be deletable or not.
Examples:trueThe source volume this snapshot was created from (may be deleted).
- SourceVolume
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/
The source volume group ID this volume group snapshot was created from.
- SourceVolumeGroup
The unique identifier for this resource.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
/^[-0-9a-z_]+$/Examples:r134-b274-678d-4dfb-8981-c71dd9d4daa5The unique name for this resource.
Possible values: 1 ≤ length ≤ 63, Value must match regular expression
/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/Examples:my-resource
The type of this resource.
Possible values: 1 ≤ length ≤ 128, Value must match regular expression
/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/
Status Code
The snapshot was updated successfully.
An invalid snapshot patch was provided.
A snapshot with the specified identifier could not be found.
{ "lifecycle_state": "stable", "size": 30, "minimum_capacity": 30, "deletable": true }{ "lifecycle_state": "stable", "size": 30, "minimum_capacity": 30, "deletable": true }