NamesApi

NamesApi

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

namesCheckUsage

namesCheckUsage(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

Example

// Import classes:
import com.ionoscloud.containerregistry.ApiClient;
import com.ionoscloud.containerregistry.ApiException;
import com.ionoscloud.containerregistry.ApiResponse;
import com.ionoscloud.containerregistry.Configuration;
import com.ionoscloud.containerregistry.auth.*;
import com.ionoscloud.containerregistry.model.*;
import com.ionoscloud.containerregistry.api.NamesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basicAuth
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: tokenAuth
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");
    NamesApi apiInstance = new NamesApi(defaultClient);
    String name = "name_example"; // String | The desired registry name
    try {
      apiInstance.namesCheckUsageWithHttpInfo(name);
    } catch (ApiException e) {
      System.err.println("Exception when calling NamesApi#namesCheckUsage");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

Parameters

Return type

null (empty response body)

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

Last updated