List all managed container registries for your account
Example
// Import classes:importcom.ionoscloud.containerregistry.ApiClient;importcom.ionoscloud.containerregistry.ApiException;importcom.ionoscloud.containerregistry.ApiResponse;importcom.ionoscloud.containerregistry.Configuration;importcom.ionoscloud.containerregistry.auth.*;importcom.ionoscloud.containerregistry.model.*;importcom.ionoscloud.containerregistry.api.RegistriesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: basicAuthHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: tokenAuthdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");RegistriesApi apiInstance =newRegistriesApi(defaultClient);String filterName ="my-registry"; // String | The registry name to search for String limit = "100"; // String | The maximum number of elements to return (used together with pagination.token for pagination)
String paginationToken = "eyJ2IjoibWV0YS5rOHMuaW8vdjEiLCJydiI6MTYzMjQ0OTk2ODAsInN0YXJ0IjoiM2RmYTc3YjctZGIwNS00MjMwLThmMjAtOGU3NjJlOTUxOTUzXHUwMDAwIn0"; // String | An opaque token used to iterate the set of results (used together with limit for pagination)
String orderBy ="orderBy_example"; // String | Order by fieldInteger maxResults ="maxResults_example"; // Integer | Maximum number of results to returntry { ApiResponse<RegistriesResponse> result = apiInstance.registriesGetWithHttpInfo(filterName, limit, paginationToken, orderBy, maxResults, filters);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling RegistriesApi#registriesGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
Create a registry to hold container images or OCI compliant artifacts - "name" must have passed validation - "location" must be one of the available location IDs - "garbageCollectionSchedule" time and days of the week for runs - "features": "vulnerabilityScanning" default is enabled
Create/replace a registry to hold container images or OCI compliant artifacts On create - "name" must have passed validation - "location" must be one of the available location IDs On update - "name" cannot be changed - "location" cannot be changed On create or update - "garbageCollectionSchedule": time and days of the week for runs
Example
// Import classes:importcom.ionoscloud.containerregistry.ApiClient;importcom.ionoscloud.containerregistry.ApiException;importcom.ionoscloud.containerregistry.ApiResponse;importcom.ionoscloud.containerregistry.Configuration;importcom.ionoscloud.containerregistry.auth.*;importcom.ionoscloud.containerregistry.model.*;importcom.ionoscloud.containerregistry.api.RegistriesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: basicAuthHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: tokenAuthdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");RegistriesApi apiInstance =newRegistriesApi(defaultClient);UUID registryId =newUUID(); // UUID | The unique ID of the registryPutRegistryInput putRegistryInput =newPutRegistryInput(); // PutRegistryInput | try {ApiResponse<PutRegistryOutput> result =apiInstance.registriesPutWithHttpInfo(registryId, putRegistryInput);System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling RegistriesApi#registriesPut");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.