curl -X POST \
-H "Authorization: Basic [[basicHash]]" \
-H "Authorization: [[apiKey]]" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
"http://localhost/api/v1/project-deployment/import-cluster"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ProjectDeploymentApi;
import java.io.File;
import java.util.*;
public class ProjectDeploymentApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: Bearer
ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
Bearer.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.setApiKeyPrefix("Token");
// Create an instance of the API class
ProjectDeploymentApi apiInstance = new ProjectDeploymentApi();
String name = name_example; // String | Cluster/project name, 3-30 chars, lowercase specific-name pattern
File config = ; // File | Kubeconfig YAML file, max 10 MiB, required when cloudId is not set
Boolean isTaikunIngressController = true; // Boolean | Use the CCF-managed ingress controller
Boolean isExistingIngressController = true; // Boolean | Use an existing ingress controller (then ingressClass/ingressHost are required)
String ingressClass = ingressClass_example; // String | Ingress class, required when using an existing ingress controller
String ingressHost = ingressHost_example; // String | Ingress host, required (and host-pattern validated) when using an existing ingress controller
String continent = continent_example; // String | Optional continent hint for placement
EImportClusterType importType = ; // EImportClusterType | Import source type
Integer organizationId = 56; // Integer | Optional organization id
Integer cloudId = 56; // Integer | Optional cloud credential id (when importing a managed cloud cluster)
String importClusterName = importClusterName_example; // String | Optional source cluster name in the cloud provider
String resourceGroupName = resourceGroupName_example; // String | Optional resource group name (Azure)
String region = region_example; // String | Optional region
try {
Object result = apiInstance.projectDeploymentImportCluster(name, config, isTaikunIngressController, isExistingIngressController, ingressClass, ingressHost, continent, importType, organizationId, cloudId, importClusterName, resourceGroupName, region);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectDeploymentApi#projectDeploymentImportCluster");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String name = new String(); // String | Cluster/project name, 3-30 chars, lowercase specific-name pattern
final File config = new File(); // File | Kubeconfig YAML file, max 10 MiB, required when cloudId is not set
final Boolean isTaikunIngressController = new Boolean(); // Boolean | Use the CCF-managed ingress controller
final Boolean isExistingIngressController = new Boolean(); // Boolean | Use an existing ingress controller (then ingressClass/ingressHost are required)
final String ingressClass = new String(); // String | Ingress class, required when using an existing ingress controller
final String ingressHost = new String(); // String | Ingress host, required (and host-pattern validated) when using an existing ingress controller
final String continent = new String(); // String | Optional continent hint for placement
final EImportClusterType importType = new EImportClusterType(); // EImportClusterType | Import source type
final Integer organizationId = new Integer(); // Integer | Optional organization id
final Integer cloudId = new Integer(); // Integer | Optional cloud credential id (when importing a managed cloud cluster)
final String importClusterName = new String(); // String | Optional source cluster name in the cloud provider
final String resourceGroupName = new String(); // String | Optional resource group name (Azure)
final String region = new String(); // String | Optional region
try {
final result = await api_instance.projectDeploymentImportCluster(name, config, isTaikunIngressController, isExistingIngressController, ingressClass, ingressHost, continent, importType, organizationId, cloudId, importClusterName, resourceGroupName, region);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->projectDeploymentImportCluster: $e\n');
}
import org.openapitools.client.api.ProjectDeploymentApi;
public class ProjectDeploymentApiExample {
public static void main(String[] args) {
ProjectDeploymentApi apiInstance = new ProjectDeploymentApi();
String name = name_example; // String | Cluster/project name, 3-30 chars, lowercase specific-name pattern
File config = ; // File | Kubeconfig YAML file, max 10 MiB, required when cloudId is not set
Boolean isTaikunIngressController = true; // Boolean | Use the CCF-managed ingress controller
Boolean isExistingIngressController = true; // Boolean | Use an existing ingress controller (then ingressClass/ingressHost are required)
String ingressClass = ingressClass_example; // String | Ingress class, required when using an existing ingress controller
String ingressHost = ingressHost_example; // String | Ingress host, required (and host-pattern validated) when using an existing ingress controller
String continent = continent_example; // String | Optional continent hint for placement
EImportClusterType importType = ; // EImportClusterType | Import source type
Integer organizationId = 56; // Integer | Optional organization id
Integer cloudId = 56; // Integer | Optional cloud credential id (when importing a managed cloud cluster)
String importClusterName = importClusterName_example; // String | Optional source cluster name in the cloud provider
String resourceGroupName = resourceGroupName_example; // String | Optional resource group name (Azure)
String region = region_example; // String | Optional region
try {
Object result = apiInstance.projectDeploymentImportCluster(name, config, isTaikunIngressController, isExistingIngressController, ingressClass, ingressHost, continent, importType, organizationId, cloudId, importClusterName, resourceGroupName, region);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectDeploymentApi#projectDeploymentImportCluster");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: BasicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
// Create an instance of the API class
ProjectDeploymentApi *apiInstance = [[ProjectDeploymentApi alloc] init];
String *name = name_example; // Cluster/project name, 3-30 chars, lowercase specific-name pattern (default to null)
File *config = ; // Kubeconfig YAML file, max 10 MiB, required when cloudId is not set (optional) (default to null)
Boolean *isTaikunIngressController = true; // Use the CCF-managed ingress controller (optional) (default to null)
Boolean *isExistingIngressController = true; // Use an existing ingress controller (then ingressClass/ingressHost are required) (optional) (default to null)
String *ingressClass = ingressClass_example; // Ingress class, required when using an existing ingress controller (optional) (default to null)
String *ingressHost = ingressHost_example; // Ingress host, required (and host-pattern validated) when using an existing ingress controller (optional) (default to null)
String *continent = continent_example; // Optional continent hint for placement (optional) (default to null)
EImportClusterType *importType = ; // Import source type (optional) (default to null)
Integer *organizationId = 56; // Optional organization id (optional) (default to null)
Integer *cloudId = 56; // Optional cloud credential id (when importing a managed cloud cluster) (optional) (default to null)
String *importClusterName = importClusterName_example; // Optional source cluster name in the cloud provider (optional) (default to null)
String *resourceGroupName = resourceGroupName_example; // Optional resource group name (Azure) (optional) (default to null)
String *region = region_example; // Optional region (optional) (default to null)
// Import cluster
[apiInstance projectDeploymentImportClusterWith:name
config:config
isTaikunIngressController:isTaikunIngressController
isExistingIngressController:isExistingIngressController
ingressClass:ingressClass
ingressHost:ingressHost
continent:continent
importType:importType
organizationId:organizationId
cloudId:cloudId
importClusterName:importClusterName
resourceGroupName:resourceGroupName
region:region
completionHandler: ^(Object output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var CcfWebApi = require('ccf_web_api');
var defaultClient = CcfWebApi.ApiClient.instance;
// Configure HTTP basic authorization: BasicAuth
var BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token";
// Create an instance of the API class
var api = new CcfWebApi.ProjectDeploymentApi()
var name = name_example; // {String} Cluster/project name, 3-30 chars, lowercase specific-name pattern
var opts = {
'config': , // {File} Kubeconfig YAML file, max 10 MiB, required when cloudId is not set
'isTaikunIngressController': true, // {Boolean} Use the CCF-managed ingress controller
'isExistingIngressController': true, // {Boolean} Use an existing ingress controller (then ingressClass/ingressHost are required)
'ingressClass': ingressClass_example, // {String} Ingress class, required when using an existing ingress controller
'ingressHost': ingressHost_example, // {String} Ingress host, required (and host-pattern validated) when using an existing ingress controller
'continent': continent_example, // {String} Optional continent hint for placement
'importType': , // {EImportClusterType} Import source type
'organizationId': 56, // {Integer} Optional organization id
'cloudId': 56, // {Integer} Optional cloud credential id (when importing a managed cloud cluster)
'importClusterName': importClusterName_example, // {String} Optional source cluster name in the cloud provider
'resourceGroupName': resourceGroupName_example, // {String} Optional resource group name (Azure)
'region': region_example // {String} Optional region
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.projectDeploymentImportCluster(name, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class projectDeploymentImportClusterExample
{
public void main()
{
// Configure HTTP basic authorization: BasicAuth
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
// Configure API key authorization: Bearer
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
// Create an instance of the API class
var apiInstance = new ProjectDeploymentApi();
var name = name_example; // String | Cluster/project name, 3-30 chars, lowercase specific-name pattern (default to null)
var config = new File(); // File | Kubeconfig YAML file, max 10 MiB, required when cloudId is not set (optional) (default to null)
var isTaikunIngressController = true; // Boolean | Use the CCF-managed ingress controller (optional) (default to null)
var isExistingIngressController = true; // Boolean | Use an existing ingress controller (then ingressClass/ingressHost are required) (optional) (default to null)
var ingressClass = ingressClass_example; // String | Ingress class, required when using an existing ingress controller (optional) (default to null)
var ingressHost = ingressHost_example; // String | Ingress host, required (and host-pattern validated) when using an existing ingress controller (optional) (default to null)
var continent = continent_example; // String | Optional continent hint for placement (optional) (default to null)
var importType = new EImportClusterType(); // EImportClusterType | Import source type (optional) (default to null)
var organizationId = 56; // Integer | Optional organization id (optional) (default to null)
var cloudId = 56; // Integer | Optional cloud credential id (when importing a managed cloud cluster) (optional) (default to null)
var importClusterName = importClusterName_example; // String | Optional source cluster name in the cloud provider (optional) (default to null)
var resourceGroupName = resourceGroupName_example; // String | Optional resource group name (Azure) (optional) (default to null)
var region = region_example; // String | Optional region (optional) (default to null)
try {
// Import cluster
Object result = apiInstance.projectDeploymentImportCluster(name, config, isTaikunIngressController, isExistingIngressController, ingressClass, ingressHost, continent, importType, organizationId, cloudId, importClusterName, resourceGroupName, region);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling ProjectDeploymentApi.projectDeploymentImportCluster: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
// Configure API key authorization: Bearer
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ProjectDeploymentApi();
$name = name_example; // String | Cluster/project name, 3-30 chars, lowercase specific-name pattern
$config = ; // File | Kubeconfig YAML file, max 10 MiB, required when cloudId is not set
$isTaikunIngressController = true; // Boolean | Use the CCF-managed ingress controller
$isExistingIngressController = true; // Boolean | Use an existing ingress controller (then ingressClass/ingressHost are required)
$ingressClass = ingressClass_example; // String | Ingress class, required when using an existing ingress controller
$ingressHost = ingressHost_example; // String | Ingress host, required (and host-pattern validated) when using an existing ingress controller
$continent = continent_example; // String | Optional continent hint for placement
$importType = ; // EImportClusterType | Import source type
$organizationId = 56; // Integer | Optional organization id
$cloudId = 56; // Integer | Optional cloud credential id (when importing a managed cloud cluster)
$importClusterName = importClusterName_example; // String | Optional source cluster name in the cloud provider
$resourceGroupName = resourceGroupName_example; // String | Optional resource group name (Azure)
$region = region_example; // String | Optional region
try {
$result = $api_instance->projectDeploymentImportCluster($name, $config, $isTaikunIngressController, $isExistingIngressController, $ingressClass, $ingressHost, $continent, $importType, $organizationId, $cloudId, $importClusterName, $resourceGroupName, $region);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectDeploymentApi->projectDeploymentImportCluster: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ProjectDeploymentApi;
# Configure HTTP basic authorization: BasicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';
# Configure API key authorization: Bearer
$WWW::OPenAPIClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ProjectDeploymentApi->new();
my $name = name_example; # String | Cluster/project name, 3-30 chars, lowercase specific-name pattern
my $config = ; # File | Kubeconfig YAML file, max 10 MiB, required when cloudId is not set
my $isTaikunIngressController = true; # Boolean | Use the CCF-managed ingress controller
my $isExistingIngressController = true; # Boolean | Use an existing ingress controller (then ingressClass/ingressHost are required)
my $ingressClass = ingressClass_example; # String | Ingress class, required when using an existing ingress controller
my $ingressHost = ingressHost_example; # String | Ingress host, required (and host-pattern validated) when using an existing ingress controller
my $continent = continent_example; # String | Optional continent hint for placement
my $importType = ; # EImportClusterType | Import source type
my $organizationId = 56; # Integer | Optional organization id
my $cloudId = 56; # Integer | Optional cloud credential id (when importing a managed cloud cluster)
my $importClusterName = importClusterName_example; # String | Optional source cluster name in the cloud provider
my $resourceGroupName = resourceGroupName_example; # String | Optional resource group name (Azure)
my $region = region_example; # String | Optional region
eval {
my $result = $api_instance->projectDeploymentImportCluster(name => $name, config => $config, isTaikunIngressController => $isTaikunIngressController, isExistingIngressController => $isExistingIngressController, ingressClass => $ingressClass, ingressHost => $ingressHost, continent => $continent, importType => $importType, organizationId => $organizationId, cloudId => $cloudId, importClusterName => $importClusterName, resourceGroupName => $resourceGroupName, region => $region);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ProjectDeploymentApi->projectDeploymentImportCluster: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: Bearer
openapi_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# Create an instance of the API class
api_instance = openapi_client.ProjectDeploymentApi()
name = name_example # String | Cluster/project name, 3-30 chars, lowercase specific-name pattern (default to null)
config = # File | Kubeconfig YAML file, max 10 MiB, required when cloudId is not set (optional) (default to null)
isTaikunIngressController = true # Boolean | Use the CCF-managed ingress controller (optional) (default to null)
isExistingIngressController = true # Boolean | Use an existing ingress controller (then ingressClass/ingressHost are required) (optional) (default to null)
ingressClass = ingressClass_example # String | Ingress class, required when using an existing ingress controller (optional) (default to null)
ingressHost = ingressHost_example # String | Ingress host, required (and host-pattern validated) when using an existing ingress controller (optional) (default to null)
continent = continent_example # String | Optional continent hint for placement (optional) (default to null)
importType = # EImportClusterType | Import source type (optional) (default to null)
organizationId = 56 # Integer | Optional organization id (optional) (default to null)
cloudId = 56 # Integer | Optional cloud credential id (when importing a managed cloud cluster) (optional) (default to null)
importClusterName = importClusterName_example # String | Optional source cluster name in the cloud provider (optional) (default to null)
resourceGroupName = resourceGroupName_example # String | Optional resource group name (Azure) (optional) (default to null)
region = region_example # String | Optional region (optional) (default to null)
try:
# Import cluster
api_response = api_instance.project_deployment_import_cluster(name, config=config, isTaikunIngressController=isTaikunIngressController, isExistingIngressController=isExistingIngressController, ingressClass=ingressClass, ingressHost=ingressHost, continent=continent, importType=importType, organizationId=organizationId, cloudId=cloudId, importClusterName=importClusterName, resourceGroupName=resourceGroupName, region=region)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProjectDeploymentApi->projectDeploymentImportCluster: %s\n" % e)
extern crate ProjectDeploymentApi;
pub fn main() {
let name = name_example; // String
let config = ; // File
let isTaikunIngressController = true; // Boolean
let isExistingIngressController = true; // Boolean
let ingressClass = ingressClass_example; // String
let ingressHost = ingressHost_example; // String
let continent = continent_example; // String
let importType = ; // EImportClusterType
let organizationId = 56; // Integer
let cloudId = 56; // Integer
let importClusterName = importClusterName_example; // String
let resourceGroupName = resourceGroupName_example; // String
let region = region_example; // String
let mut context = ProjectDeploymentApi::Context::default();
let result = client.projectDeploymentImportCluster(name, config, isTaikunIngressController, isExistingIngressController, ingressClass, ingressHost, continent, importType, organizationId, cloudId, importClusterName, resourceGroupName, region, &context).wait();
println!("{:?}", result);
}