Create a Private Container Registry
Once you have fetched your required information, you can now create a new Private Container Registry. For the Private Container Registry, you can alter the days and time. You can also update the location based on the available Private Container Registry locations.
We assume the following prerequisites:
With the POST request, you can create a Private Container Registry.
Request
curl --location \
--request POST 'https://api.ionos.com/containerregistries/registries' \
--header 'Authorization: Bearer ${TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
"properties": {
"garbageCollectionSchedule": {
"days": [
"Saturday",
"Sunday"
],
"time": "19:30:00+00:00"
},
"location": "de/fra",
"name": "demo",
"apiSubnetAllowList": ["198.51.100.0/24", "203.0.113.1/32"]
}
}'Input Parameters
You can update the limit value to get specific Private Container Registries based on the limit value being passed.
days
array
The days of the week selected.
Monday
time
string
The timestamp of creation of the Private Container Registry.
19:30:00+00:00
location
string
The location of the resource.
de/fra
name
string
The name of the Private Container Registry. It must be unique within the folder.
Demo
days
array
The days of the week selected.
Monday
apiSubnetAllowList
array
The list of IP subnets that can access the Private Container Registry. If this parameter is omitted, the Private Container Registry is reachable from any IP address.
198.51.100.0/24
Response
200 OK - Successfully showed the list of Private Container Registries.
Response Fields
id
string
The ID of fetched output.
locations
type
string
The type of resource.
registry
createdBy
string
ID of the user or service account that initiated the operation.
sample@ionos.com
createdDate
string
The date when the operation was initiated.
h2022-10-07T14:30:06Z
days
array
The days of the week selected.
Sunday, Saturday
apiSubnetAllowList
array
The list of IP subnets in CIDR notation that can access the Private Container Registry. For single IPs a /32 mask can be used. Addresses without a mask will be assumed to carry a /32 mask.
198.51.100.0/24
400 Bad Request - The request made is invalid or corrupted
Last updated
Was this helpful?