ionoscloud-container-registry
Overview
Container Registry service enables IONOS clients to manage docker and OCI compliant registries for use by their managed Kubernetes clusters. Use a Container Registry to ensure you have a privately accessed registry to efficiently support image pulls.
Changelog
1.1.0
- Added new endpoints for Repositories
- Added new endpoints for Artifacts
- Added new endpoints for Vulnerabilities
- Added registry vulnerabilityScanning feature
1.2.0
- Added registry
apiSubnetAllowList
1.2.1
- Amended
apiSubnetAllowListRegex
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.2.1
- Package version: 2.0.0
- Generator version: 7.13.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python 3.9+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/ionos-cloud/sdk-python.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/ionos-cloud/sdk-python.git)
Then import the package:
import ionoscloud_container_registry
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import ionoscloud_container_registry
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import ionoscloud_container_registry
from ionoscloud_container_registry.rest import ApiException
from pprint import pprint
import os
# Defining the host is optional and defaults to https://api.ionos.com/containerregistries
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_container_registry.Configuration(
host = "https://api.ionos.com/containerregistries"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with ionoscloud_container_registry.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_container_registry.ArtifactsApi(api_client)
registry_id = '1e41a73c-59d0-5507-86dd-fa2fc2501cfd' # str | The ID (UUID) of the Registry.
offset = 0 # int | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. (optional) (default to 0)
limit = 100 # int | The maximum number of elements to return. Use together with offset for pagination. (optional) (default to 100)
filter_vulnerability_id = 'filter_vulnerability_id_example' # str | Filter resources by vulnerabilityId. (optional)
order_by = -pullCount # str | The field to order the results by. If not provided, the results will be ordered by the default field. (optional) (default to -pullCount)
try:
# Retrieve all Artifacts by Registry
api_response = api_instance.registries_artifacts_get(registry_id, offset=offset, limit=limit, filter_vulnerability_id=filter_vulnerability_id, order_by=order_by)
print("The response of ArtifactsApi->registries_artifacts_get:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ArtifactsApi->registries_artifacts_get: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.ionos.com/containerregistries
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ArtifactsApi | registries_artifacts_get | GET /registries/{registryId}/artifacts | Retrieve all Artifacts by Registry |
| ArtifactsApi | registries_repositories_artifacts_find_by_digest | GET /registries/{registryId}/repositories/{repositoryName}/artifacts/{digest} | Retrieve Artifact |
| ArtifactsApi | registries_repositories_artifacts_get | GET /registries/{registryId}/repositories/{repositoryName}/artifacts | Retrieve all Artifacts by Repository |
| ArtifactsApi | registries_repositories_artifacts_vulnerabilities_get | GET /registries/{registryId}/repositories/{repositoryName}/artifacts/{digest}/vulnerabilities | Retrieve all Vulnerabilities |
| LocationsApi | locations_get | GET /locations | Get container registry locations |
| NamesApi | names_check_usage | HEAD /names/{name} | Get container registry name availability |
| RegistriesApi | registries_delete | DELETE /registries/{registryId} | Delete registry |
| RegistriesApi | registries_find_by_id | GET /registries/{registryId} | Get a registry |
| RegistriesApi | registries_get | GET /registries | List all container registries |
| RegistriesApi | registries_patch | PATCH /registries/{registryId} | Update the properties of a registry |
| RegistriesApi | registries_post | POST /registries | Create container registry |
| RegistriesApi | registries_put | PUT /registries/{registryId} | Create or replace a container registry |
| RepositoriesApi | registries_repositories_delete | DELETE /registries/{registryId}/repositories/{repositoryName} | Delete repository |
| RepositoriesApi | registries_repositories_find_by_name | GET /registries/{registryId}/repositories/{repositoryName} | Retrieve Repository |
| RepositoriesApi | registries_repositories_get | GET /registries/{registryId}/repositories | Retrieve all Repositories |
| TokensApi | registries_tokens_delete | DELETE /registries/{registryId}/tokens/{tokenId} | Delete token |
| TokensApi | registries_tokens_find_by_id | GET /registries/{registryId}/tokens/{tokenId} | Get token information |
| TokensApi | registries_tokens_get | GET /registries/{registryId}/tokens | List all tokens for the container registry |
| TokensApi | registries_tokens_patch | PATCH /registries/{registryId}/tokens/{tokenId} | Update token |
| TokensApi | registries_tokens_post | POST /registries/{registryId}/tokens | Create token |
| TokensApi | registries_tokens_put | PUT /registries/{registryId}/tokens/{tokenId} | Create or replace token |
| VulnerabilitiesApi | vulnerabilities_find_by_id | GET /vulnerabilities/{vulnerabilityId} | Retrieve Vulnerability |
Documentation For Models
- ApiErrorMessage
- ApiErrorResponse
- ApiResourceMetadata
- Artifact
- ArtifactMetadata
- ArtifactRead
- ArtifactReadList
- ArtifactVulnerabilityReadList
- Credentials
- Day
- Error
- ErrorMessagesInner
- Feature
- FeatureVulnerabilityScanning
- Links
- Location
- LocationsResponse
- Metadata
- Pagination
- PaginationLinks
- PatchRegistryInput
- PatchTokenInput
- PostRegistryInput
- PostRegistryOutput
- PostRegistryProperties
- PostTokenInput
- PostTokenOutput
- PostTokenProperties
- Purl
- PutRegistryInput
- PutRegistryOutput
- PutTokenInput
- PutTokenOutput
- RegistriesResponse
- RegistryArtifactsReadList
- RegistryFeatures
- RegistryPagination
- RegistryProperties
- RegistryResponse
- Repository
- RepositoryMetadata
- RepositoryRead
- RepositoryReadList
- Scope
- StorageUsage
- TokenProperties
- TokenResponse
- TokensResponse
- Vulnerability
- VulnerabilityDataSource
- VulnerabilityMetadata
- VulnerabilityRead
- VulnerabilityReadList
- WeeklySchedule
Documentation For Authorization
Authentication schemes defined for the API:
basicAuth
- Type: HTTP basic authentication
tokenAuth
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Author
Metadata
Release files for ionoscloud-container-registry 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ionoscloud_container_registry-2.0.0.tar.gz | 52.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ionoscloud_container_registry-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 198.0 kB
Release files / ionoscloud_container_registry-2.0.0.tar.gz
| Download URL | ionoscloud_container_registry-2.0.0.tar.gz |
|---|---|
| Size | 52.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
126e639d72aacdd8476fd51e8a203879cab61d226ada66a1c7bec9f5c1df978d
|
|
BLAKE2b-256 checksum How to use checksums |
7cde22a0c0282753263660d76717f53f56f3a90bed12c76e0fd4636e8fe7e9f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / ionoscloud_container_registry-2.0.0-py3-none-any.whl
| Download URL | ionoscloud_container_registry-2.0.0-py3-none-any.whl |
|---|---|
| Size | 145.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3e0f066c92de5681a58500f9740c20de2ec2cabbd29cc405fb9a7f4635a6163
|
|
BLAKE2b-256 checksum How to use checksums |
b5155f4bb700545d778c5dcc2dcc4136443271eae804bc221f81327c8077881a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|