# RegistriesApi

All URIs are relative to *<https://api.ionos.com/containerregistries>*

| Method                                        | HTTP request                        | Description                            |
| --------------------------------------------- | ----------------------------------- | -------------------------------------- |
| [**registriesDelete**](#registriesdelete)     | **DELETE** /registries/{registryId} | Delete registry                        |
| [**registriesFindById**](#registriesfindbyid) | **GET** /registries/{registryId}    | Get a registry                         |
| [**registriesGet**](#registriesget)           | **GET** /registries                 | List all container registries          |
| [**registriesPatch**](#registriespatch)       | **PATCH** /registries/{registryId}  | Update the properties of a registry    |
| [**registriesPost**](#registriespost)         | **POST** /registries                | Create container registry              |
| [**registriesPut**](#registriesput)           | **PUT** /registries/{registryId}    | Create or replace a container registry |

## registriesDelete

> registriesDelete(registryId)

Delete registry

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-container-registry');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.RegistriesApi(config);
// Delete registry
api_instance
  .registriesDelete({
    registryId: 38400000-8cf0-11bd-b23e-10b96e4ef00d
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name           | Type                                                                                                             | Description                   | Notes                   |
| -------------- | ---------------------------------------------------------------------------------------------------------------- | ----------------------------- | ----------------------- |
| **registryId** | [**string**](https://github.com/ionos-cloud/sdk-nodejs-container-registry/blob/master/docs/models/.md/README.md) | The unique ID of the registry | \[default to undefined] |

### Return type

nil (empty response body)

### Authorization

basicAuth, tokenAuth

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## registriesFindById

> registriesFindById(registryId)

Get a registry

Get all information for a specific container registry

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-container-registry');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.RegistriesApi(config);
// Get a registry
api_instance
  .registriesFindById({
    registryId: 38400000-8cf0-11bd-b23e-10b96e4ef00d
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name           | Type                                                                                                             | Description                   | Notes                   |
| -------------- | ---------------------------------------------------------------------------------------------------------------- | ----------------------------- | ----------------------- |
| **registryId** | [**string**](https://github.com/ionos-cloud/sdk-nodejs-container-registry/blob/master/docs/models/.md/README.md) | The unique ID of the registry | \[default to undefined] |

### Return type

[**RegistryResponse**](https://docs.ionos.com/sections-test/nodejs-sdk/container-registry-nodejs-sdk/models/registryresponse)

### Authorization

basicAuth, tokenAuth

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## registriesGet

> registriesGet(opts)

List all container registries

List all managed container registries for your account

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-container-registry');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.RegistriesApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// List all container registries
api_instance
  .registriesGet({
    filterName: my-registry,
    limit: limit_example,
    paginationToken: eyJ2IjoibWV0YS5rOHMuaW8vdjEiLCJydiI6MTYzMjQ0OTk2ODAsInN0YXJ0IjoiM2RmYTc3YjctZGIwNS00MjMwLThmMjAtOGU3NjJlOTUxOTUzXHUwMDAwIn0
    maxResults: 2,
    filters: filterMap
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                | Type       | Description                                                                                   | Notes                              |
| ------------------- | ---------- | --------------------------------------------------------------------------------------------- | ---------------------------------- |
| **filterName**      | **string** | The registry name to search for                                                               | \[optional]\[default to undefined] |
| **limit**           | **string** | The maximum number of elements to return (used together with pagination.token for pagination) | \[optional]\[default to '100']     |
| **paginationToken** | **string** | An opaque token used to iterate the set of results (used together with limit for pagination)  | \[optional]\[default to undefined] |

### Return type

[**RegistriesResponse**](https://docs.ionos.com/sections-test/nodejs-sdk/container-registry-nodejs-sdk/models/registriesresponse)

### Authorization

basicAuth, tokenAuth

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## registriesPatch

> registriesPatch(registryId, patchRegistryInput)

Update the properties of a registry

Update the properties of a registry - "garbageCollectionSchedule" time and days of the week for runs

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-container-registry');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.RegistriesApi(config);
// Update the properties of a registry
api_instance
  .registriesPatch({
    registryId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
    patchRegistryInput: patchRegistryInput_example
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                   | Type                                                                                                                              | Description                   | Notes                   |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | ----------------------- |
| **registryId**         | [**string**](https://github.com/ionos-cloud/sdk-nodejs-container-registry/blob/master/docs/models/.md/README.md)                  | The unique ID of the registry | \[default to undefined] |
| **patchRegistryInput** | [**PatchRegistryInput**](https://docs.ionos.com/sections-test/nodejs-sdk/container-registry-nodejs-sdk/models/patchregistryinput) |                               |                         |

### Return type

[**RegistryResponse**](https://docs.ionos.com/sections-test/nodejs-sdk/container-registry-nodejs-sdk/models/registryresponse)

### Authorization

basicAuth, tokenAuth

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## registriesPost

> registriesPost(postRegistryInput)

Create container registry

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

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-container-registry');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.RegistriesApi(config);
// Create container registry
api_instance
  .registriesPost({
    postRegistryInput: postRegistryInput_example
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                  | Type                                                                                                                            | Description | Notes |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------- | ----- |
| **postRegistryInput** | [**PostRegistryInput**](https://docs.ionos.com/sections-test/nodejs-sdk/container-registry-nodejs-sdk/models/postregistryinput) |             |       |

### Return type

[**PostRegistryOutput**](https://docs.ionos.com/sections-test/nodejs-sdk/container-registry-nodejs-sdk/models/postregistryoutput)

### Authorization

basicAuth, tokenAuth

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## registriesPut

> registriesPut(registryId, putRegistryInput)

Create or replace a container registry

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

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-container-registry');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.RegistriesApi(config);
// Create or replace a container registry
api_instance
  .registriesPut({
    registryId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
    putRegistryInput: putRegistryInput_example
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                 | Type                                                                                                                          | Description                   | Notes                   |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | ----------------------- |
| **registryId**       | [**string**](https://github.com/ionos-cloud/sdk-nodejs-container-registry/blob/master/docs/models/.md/README.md)              | The unique ID of the registry | \[default to undefined] |
| **putRegistryInput** | [**PutRegistryInput**](https://docs.ionos.com/sections-test/nodejs-sdk/container-registry-nodejs-sdk/models/putregistryinput) |                               |                         |

### Return type

[**PutRegistryOutput**](https://docs.ionos.com/sections-test/nodejs-sdk/container-registry-nodejs-sdk/models/putregistryoutput)

### Authorization

basicAuth, tokenAuth

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json
