master
Models
ImagesApi
All URIs are relative to https://api.ionos.com/cloudapi/v6
Method
HTTP request
Description
​ImagesDelete​
Delete /images/{imageId}
Delete images
​ImagesFindById​
Get /images/{imageId}
Retrieve images
​ImagesGet​
Get /images
List images
​ImagesPatch​
Patch /images/{imageId}
Partially modify images
​ImagesPut​
Put /images/{imageId}
Modify images

ImagesDelete

1
var result = ImagesDelete(ctx, imageId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Delete images

Example

1
package main
2
​
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
​
10
func main() {
11
imageId := "imageId_example" // string | The unique ID of the image.
12
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
13
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
14
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
15
​
16
configuration := openapiclient.NewConfiguration()
17
apiClient := openapiclient.NewAPIClient(configuration)
18
resp, r, err := apiClient.ImagesApi.ImagesDelete(context.Background(), imageId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesDelete``: %v\n", err)
21
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22
}
23
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
​
imageId
string
The unique ID of the image.
​

Other Parameters

Other parameters are passed through a pointer to a apiImagesDeleteRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
​

Return type

(empty response body)

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ImagesFindById

1
var result Image = ImagesFindById(ctx, imageId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Retrieve images

Example

1
package main
2
​
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
​
10
func main() {
11
imageId := "imageId_example" // string | The unique ID of the image.
12
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
13
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
14
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
15
​
16
configuration := openapiclient.NewConfiguration()
17
apiClient := openapiclient.NewAPIClient(configuration)
18
resp, r, err := apiClient.ImagesApi.ImagesFindById(context.Background(), imageId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesFindById``: %v\n", err)
21
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22
}
23
// response from `ImagesFindById`: Image
24
fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesFindById`: %v\n", resp)
25
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
​
imageId
string
The unique ID of the image.
​

Other Parameters

Other parameters are passed through a pointer to a apiImagesFindByIdRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
​

Return type

​Image​

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ImagesGet

1
var result Images = ImagesGet(ctx)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
List images

Example

1
package main
2
​
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
​
10
func main() {
11
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
12
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
13
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
14
​
15
configuration := openapiclient.NewConfiguration()
16
apiClient := openapiclient.NewAPIClient(configuration)
17
resp, r, err := apiClient.ImagesApi.ImagesGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
18
if err != nil {
19
fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesGet``: %v\n", err)
20
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21
}
22
// response from `ImagesGet`: Images
23
fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesGet`: %v\n", resp)
24
}
Copied!

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiImagesGetRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
​

Return type

​Images​

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ImagesPatch

1
var result Image = ImagesPatch(ctx, imageId)
2
.Image(image)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Partially modify images

Example

1
package main
2
​
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
​
10
func main() {
11
imageId := "imageId_example" // string | The unique ID of the image.
12
image := *openapiclient.NewImageProperties("LINUX") // ImageProperties | The image properties to be updated.
13
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
14
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
15
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
16
​
17
configuration := openapiclient.NewConfiguration()
18
apiClient := openapiclient.NewAPIClient(configuration)
19
resp, r, err := apiClient.ImagesApi.ImagesPatch(context.Background(), imageId).Image(image).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesPatch``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `ImagesPatch`: Image
25
fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesPatch`: %v\n", resp)
26
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
​
imageId
string
The unique ID of the image.
​

Other Parameters

Other parameters are passed through a pointer to a apiImagesPatchRequest struct via the builder pattern
Name
Type
Description
Notes
image
​ImageProperties​
The image properties to be updated.
​
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
​

Return type

​Image​

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ImagesPut

1
var result Image = ImagesPut(ctx, imageId)
2
.Image(image)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Modify images

Example

1
package main
2
​
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
​
10
func main() {
11
imageId := "imageId_example" // string | The unique ID of the image.
12
image := *openapiclient.NewImage(*openapiclient.NewImageProperties("LINUX")) // Image | The modified image
13
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
14
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0)
15
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
16
​
17
configuration := openapiclient.NewConfiguration()
18
apiClient := openapiclient.NewAPIClient(configuration)
19
resp, r, err := apiClient.ImagesApi.ImagesPut(context.Background(), imageId).Image(image).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesPut``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `ImagesPut`: Image
25
fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesPut`: %v\n", resp)
26
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
​
imageId
string
The unique ID of the image.
​

Other Parameters

Other parameters are passed through a pointer to a apiImagesPutRequest struct via the builder pattern
Name
Type
Description
Notes
image
​Image​
The modified image
​
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[default to 0]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
​

Return type

​Image​

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json