RegistriesApi
All URIs are relative to https://api.ionos.com/containerregistries
RegistriesDelete
var result = RegistriesDelete(ctx, registryId)
.Execute()
Delete registry
Example
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
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesDeleteRequest struct via the builder pattern
Return type
(empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
RegistriesFindById
var result RegistryResponse = RegistriesFindById(ctx, registryId)
.Execute()
Get a registry
Example
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
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesFindByIdRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
RegistriesGet
var result RegistriesResponse = RegistriesGet(ctx)
.FilterName(filterName)
.Limit(limit)
.PaginationToken(paginationToken)
.Execute()
List all container registries
Example
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
filterName
string
The registry name to search for
limit
string
The maximum number of elements to return (used together with pagination.token for pagination)
[default to "100"]
paginationToken
string
An opaque token used to iterate the set of results (used together with limit for pagination)
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
RegistriesPatch
var result RegistryResponse = RegistriesPatch(ctx, registryId)
.PatchRegistryInput(patchRegistryInput)
.Execute()
Update the properties of a registry
Example
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
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesPatchRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
RegistriesPost
var result PostRegistryOutput = RegistriesPost(ctx)
.PostRegistryInput(postRegistryInput)
.Execute()
Create container registry
Example
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
HTTP request headers
Content-Type: application/json
Accept: application/json
RegistriesPut
var result PutRegistryOutput = RegistriesPut(ctx, registryId)
.PutRegistryInput(putRegistryInput)
.Execute()
Create or replace a container registry
Example
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
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesPutRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
Last updated