# NamesApi

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

| Method                                        | HTTP request           | Description                              |
| --------------------------------------------- | ---------------------- | ---------------------------------------- |
| [**names\_check\_usage**](#names_check_usage) | **HEAD** /names/{name} | Get container registry name availability |

## names\_check\_usage

> names\_check\_usage(name)

Get container registry name availability

Validate that the name is suitable to use for a new registry: - it uses only the characters "a-z", "0-9", or "-" - and starts with a letter and ends with a letter or number - and is between 3 to 63 characters in length - and is available

### Examples

```ruby
require 'time'
require 'ionoscloud-container-registry'
# setup authorization
IonoscloudContainerRegistry.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: tokenAuth
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = IonoscloudContainerRegistry::NamesApi.new
name = 'name_example' # String | The desired registry name

begin
  # Get container registry name availability
  api_instance.names_check_usage(name)
rescue IonoscloudContainerRegistry::ApiError => e
  puts "Error when calling NamesApi->names_check_usage: #{e}"
end
```

#### Using the names\_check\_usage\_with\_http\_info variant

This returns an Array which contains the response data (`nil` in this case), status code and headers.

> \<Array(nil, Integer, Hash)> names\_check\_usage\_with\_http\_info(name)

```ruby
begin
  # Get container registry name availability
  data, status_code, headers = api_instance.names_check_usage_with_http_info(name)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue IonoscloudContainerRegistry::ApiError => e
  puts "Error when calling NamesApi->names_check_usage_with_http_info: #{e}"
end
```

### Parameters

| Name     | Type       | Description               | Notes |
| -------- | ---------- | ------------------------- | ----- |
| **name** | **String** | The desired registry name |       |

### Return type

nil (empty response body)

### Authorization

basicAuth, tokenAuth

### HTTP request headers

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/container-registry-sdk-ruby/api/namesapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
