from__future__import print_functionimport timeimport ionoscloud_container_registryfrom ionoscloud_container_registry.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/containerregistriesconfiguration = ionoscloud_container_registry.Configuration( host ='https://api.ionos.com/containerregistries',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud_container_registry.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud_container_registry.RegistriesApi(api_client) registry_id ='registry_id_example'# str | The unique ID of the registrytry:# Delete registry api_instance.registries_delete(registry_id)except ApiException as e:print('Exception when calling RegistriesApi.registries_delete: %s\n'% e)
Get all information for a specific container registry
Example
from__future__import print_functionimport timeimport ionoscloud_container_registryfrom ionoscloud_container_registry.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/containerregistriesconfiguration = ionoscloud_container_registry.Configuration( host ='https://api.ionos.com/containerregistries',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud_container_registry.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud_container_registry.RegistriesApi(api_client) registry_id ='registry_id_example'# str | The unique ID of the registrytry:# Get a registry api_response = api_instance.registries_find_by_id(registry_id)print(api_response)except ApiException as e:print('Exception when calling RegistriesApi.registries_find_by_id: %s\n'% e)
List all managed container registries for your account
Example
from__future__import print_functionimport timeimport ionoscloud_container_registryfrom ionoscloud_container_registry.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/containerregistriesconfiguration = ionoscloud_container_registry.Configuration( host ='https://api.ionos.com/containerregistries',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud_container_registry.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud_container_registry.RegistriesApi(api_client)try:# List all container registries api_response = api_instance.registries_get()print(api_response)except ApiException as e:print('Exception when calling RegistriesApi.registries_get: %s\n'% e)
Parameters
Name
Type
Description
Notes
filter_name
str
The registry name to search for
[optional]
limit
str
The maximum number of elements to return (used together with pagination.token for pagination)
[optional] [default to '100']
pagination_token
str
An opaque token used to iterate the set of results (used together with limit for pagination)
Update the properties of a registry - "garbageCollectionSchedule" time and days of the week for runs
Example
from__future__import print_functionimport timeimport ionoscloud_container_registryfrom ionoscloud_container_registry.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/containerregistriesconfiguration = ionoscloud_container_registry.Configuration( host ='https://api.ionos.com/containerregistries',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud_container_registry.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud_container_registry.RegistriesApi(api_client) registry_id ='registry_id_example'# str | The unique ID of the registry patch_registry_input = ionoscloud_container_registry.PatchRegistryInput()# PatchRegistryInput | try:# Update the properties of a registry api_response = api_instance.registries_patch(registry_id, patch_registry_input)print(api_response)except ApiException as e:print('Exception when calling RegistriesApi.registries_patch: %s\n'% e)
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
Example
from__future__import print_functionimport timeimport ionoscloud_container_registryfrom ionoscloud_container_registry.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/containerregistriesconfiguration = ionoscloud_container_registry.Configuration( host ='https://api.ionos.com/containerregistries',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud_container_registry.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud_container_registry.RegistriesApi(api_client) post_registry_input = ionoscloud_container_registry.PostRegistryInput()# PostRegistryInput | try:# Create container registry api_response = api_instance.registries_post(post_registry_input)print(api_response)except ApiException as e:print('Exception when calling RegistriesApi.registries_post: %s\n'% e)
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
from__future__import print_functionimport timeimport ionoscloud_container_registryfrom ionoscloud_container_registry.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/containerregistriesconfiguration = ionoscloud_container_registry.Configuration( host ='https://api.ionos.com/containerregistries',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud_container_registry.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud_container_registry.RegistriesApi(api_client) registry_id ='registry_id_example'# str | The unique ID of the registry put_registry_input = ionoscloud_container_registry.PutRegistryInput()# PutRegistryInput | try:# Create or replace a container registry api_response = api_instance.registries_put(registry_id, put_registry_input)print(api_response)except ApiException as e:print('Exception when calling RegistriesApi.registries_put: %s\n'% e)