All URIs are relative to https://api.ionos.com/containerregistries
Method HTTP request Description
RegistriesDelete
Copy var result = RegistriesDelete (ctx, registryId)
. Execute ()
Delete registry
Example
Copy package main
import (
"context"
"fmt"
"os"
containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main () {
registryId := TODO // string | The unique ID of the registry
configuration := shared. NewConfiguration ( "USERNAME" , "PASSWORD" , "TOKEN" , "HOST_URL" )
apiClient := containerregistry. NewAPIClient (configuration)
resource, resp, err := apiClient.RegistriesApi. RegistriesDelete (context. Background (), registryId). Execute ()
if err != nil {
fmt. Fprintf (os.Stderr, "Error when calling `RegistriesApi.RegistriesDelete``: %v \n" , err)
fmt. Fprintf (os.Stderr, "Full HTTP response: %v \n" , resp)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesDeleteRequest struct via the builder pattern
Return type
(empty response body)
Content-Type : Not defined
RegistriesFindById
Copy var result RegistryResponse = RegistriesFindById (ctx, registryId)
. Execute ()
Get a registry
Example
Copy package main
import (
"context"
"fmt"
"os"
containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main () {
registryId := TODO // string | The unique ID of the registry
configuration := shared. NewConfiguration ( "USERNAME" , "PASSWORD" , "TOKEN" , "HOST_URL" )
apiClient := containerregistry. NewAPIClient (configuration)
resource, resp, err := apiClient.RegistriesApi. RegistriesFindById (context. Background (), registryId). Execute ()
if err != nil {
fmt. Fprintf (os.Stderr, "Error when calling `RegistriesApi.RegistriesFindById``: %v \n" , err)
fmt. Fprintf (os.Stderr, "Full HTTP response: %v \n" , resp)
}
// response from `RegistriesFindById`: RegistryResponse
fmt. Fprintf (os.Stdout, "Response from `RegistriesApi.RegistriesFindById`: %v \n" , resource)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesFindByIdRequest struct via the builder pattern
Return type
RegistryResponse
Content-Type : Not defined
RegistriesGet
Copy var result RegistriesResponse = RegistriesGet (ctx)
. FilterName (filterName)
. Limit (limit)
. PaginationToken (paginationToken)
. Execute ()
List all container registries
Example
Copy package main
import (
"context"
"fmt"
"os"
containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main () {
filterName := "my-registry" // string | The registry name to search for (optional)
limit := "limit_example" // string | The maximum number of elements to return (used together with pagination.token for pagination) (optional) (default to "100")
paginationToken := "eyJ2IjoibWV0YS5rOHMuaW8vdjEiLCJydiI6MTYzMjQ0OTk2ODAsInN0YXJ0IjoiM2RmYTc3YjctZGIwNS00MjMwLThmMjAtOGU3NjJlOTUxOTUzXHUwMDAwIn0" // string | An opaque token used to iterate the set of results (used together with limit for pagination) (optional)
configuration := shared. NewConfiguration ( "USERNAME" , "PASSWORD" , "TOKEN" , "HOST_URL" )
apiClient := containerregistry. NewAPIClient (configuration)
resource, resp, err := apiClient.RegistriesApi.RegistriesGet(context.Background()).FilterName(filterName).Limit(limit).PaginationToken(paginationToken).Execute()
if err != nil {
fmt. Fprintf (os.Stderr, "Error when calling `RegistriesApi.RegistriesGet``: %v \n" , err)
fmt. Fprintf (os.Stderr, "Full HTTP response: %v \n" , resp)
}
// response from `RegistriesGet`: RegistriesResponse
fmt. Fprintf (os.Stdout, "Response from `RegistriesApi.RegistriesGet`: %v \n" , resource)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesGetRequest struct via the builder pattern
Return type
RegistriesResponse
Content-Type : Not defined
RegistriesPatch
Copy var result RegistryResponse = RegistriesPatch (ctx, registryId)
. PatchRegistryInput (patchRegistryInput)
. Execute ()
Update the properties of a registry
Example
Copy package main
import (
"context"
"fmt"
"os"
containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main () {
registryId := TODO // string | The unique ID of the registry
patchRegistryInput := * openapiclient. NewPatchRegistryInput () // PatchRegistryInput |
configuration := shared. NewConfiguration ( "USERNAME" , "PASSWORD" , "TOKEN" , "HOST_URL" )
apiClient := containerregistry. NewAPIClient (configuration)
resource, resp, err := apiClient.RegistriesApi.RegistriesPatch(context.Background(), registryId).PatchRegistryInput(patchRegistryInput).Execute()
if err != nil {
fmt. Fprintf (os.Stderr, "Error when calling `RegistriesApi.RegistriesPatch``: %v \n" , err)
fmt. Fprintf (os.Stderr, "Full HTTP response: %v \n" , resp)
}
// response from `RegistriesPatch`: RegistryResponse
fmt. Fprintf (os.Stdout, "Response from `RegistriesApi.RegistriesPatch`: %v \n" , resource)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesPatchRequest struct via the builder pattern
Return type
RegistryResponse
Content-Type : application/json
RegistriesPost
Copy var result PostRegistryOutput = RegistriesPost (ctx)
. PostRegistryInput (postRegistryInput)
. Execute ()
Create container registry
Example
Copy package main
import (
"context"
"fmt"
"os"
containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main () {
postRegistryInput := *openapiclient.NewPostRegistryInput(*openapiclient.NewPostRegistryProperties("de/txl", "my-registry")) // PostRegistryInput |
configuration := shared. NewConfiguration ( "USERNAME" , "PASSWORD" , "TOKEN" , "HOST_URL" )
apiClient := containerregistry. NewAPIClient (configuration)
resource, resp, err := apiClient.RegistriesApi.RegistriesPost(context.Background()).PostRegistryInput(postRegistryInput).Execute()
if err != nil {
fmt. Fprintf (os.Stderr, "Error when calling `RegistriesApi.RegistriesPost``: %v \n" , err)
fmt. Fprintf (os.Stderr, "Full HTTP response: %v \n" , resp)
}
// response from `RegistriesPost`: PostRegistryOutput
fmt. Fprintf (os.Stdout, "Response from `RegistriesApi.RegistriesPost`: %v \n" , resource)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesPostRequest struct via the builder pattern
Return type
PostRegistryOutput
Content-Type : application/json
RegistriesPut
Copy var result PutRegistryOutput = RegistriesPut (ctx, registryId)
. PutRegistryInput (putRegistryInput)
. Execute ()
Create or replace a container registry
Example
Copy package main
import (
"context"
"fmt"
"os"
containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main () {
registryId := TODO // string | The unique ID of the registry
putRegistryInput := *openapiclient.NewPutRegistryInput(*openapiclient.NewPostRegistryProperties("de/txl", "my-registry")) // PutRegistryInput |
configuration := shared. NewConfiguration ( "USERNAME" , "PASSWORD" , "TOKEN" , "HOST_URL" )
apiClient := containerregistry. NewAPIClient (configuration)
resource, resp, err := apiClient.RegistriesApi.RegistriesPut(context.Background(), registryId).PutRegistryInput(putRegistryInput).Execute()
if err != nil {
fmt. Fprintf (os.Stderr, "Error when calling `RegistriesApi.RegistriesPut``: %v \n" , err)
fmt. Fprintf (os.Stderr, "Full HTTP response: %v \n" , resp)
}
// response from `RegistriesPut`: PutRegistryOutput
fmt. Fprintf (os.Stdout, "Response from `RegistriesApi.RegistriesPut`: %v \n" , resource)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesPutRequest struct via the builder pattern
Return type
PutRegistryOutput
Content-Type : application/json