exportLocalArchive
Exports jobs and resources locally
Returns an archive containing all jobs and resources in a virtual cluster. Optional Filters can limit what is exported.
/admin/export
Usage and SDK Samples
curl -X GET\
-H "Accept: application/octet-stream"\
"//admin/export?exportjobs=&jobfilter=&exportjobresources=&exportresources=&resourcefilter=&backupname="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminApi;
import java.io.File;
import java.util.*;
public class AdminApiExample {
public static void main(String[] args) {
AdminApi apiInstance = new AdminApi();
Boolean exportjobs = true; // Boolean | export all jobs in the virtual cluster
array[String] jobfilter = ; // array[String] | If exportjobs is true, only export jobs that the meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a job API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'created[gte]2020-01-01'. Multiple filters are ANDed.
Boolean exportjobresources = true; // Boolean | also export resources needed for jobs - selected resources cannot be filtered out by resourcefilter parameter
Boolean exportresources = true; // Boolean | export all resource in the virtual cluster
array[String] resourcefilter = ; // array[String] | If exportresources is true, only export resources that meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a resource API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'name[noteq]my-resource'. Multiple filters are ANDed.
String backupname = backupname_example; // String | Name of backup archive, if not specified backup-yyyymmddhhmmss will be used
try {
'String' result = apiInstance.exportLocalArchive(exportjobs, jobfilter, exportjobresources, exportresources, resourcefilter, backupname);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#exportLocalArchive");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AdminApi;
public class AdminApiExample {
public static void main(String[] args) {
AdminApi apiInstance = new AdminApi();
Boolean exportjobs = true; // Boolean | export all jobs in the virtual cluster
array[String] jobfilter = ; // array[String] | If exportjobs is true, only export jobs that the meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a job API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'created[gte]2020-01-01'. Multiple filters are ANDed.
Boolean exportjobresources = true; // Boolean | also export resources needed for jobs - selected resources cannot be filtered out by resourcefilter parameter
Boolean exportresources = true; // Boolean | export all resource in the virtual cluster
array[String] resourcefilter = ; // array[String] | If exportresources is true, only export resources that meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a resource API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'name[noteq]my-resource'. Multiple filters are ANDed.
String backupname = backupname_example; // String | Name of backup archive, if not specified backup-yyyymmddhhmmss will be used
try {
'String' result = apiInstance.exportLocalArchive(exportjobs, jobfilter, exportjobresources, exportresources, resourcefilter, backupname);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#exportLocalArchive");
e.printStackTrace();
}
}
}
Boolean *exportjobs = true; // export all jobs in the virtual cluster (optional) (default to true)
array[String] *jobfilter = ; // If exportjobs is true, only export jobs that the meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a job API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'created[gte]2020-01-01'. Multiple filters are ANDed. (optional)
Boolean *exportjobresources = true; // also export resources needed for jobs - selected resources cannot be filtered out by resourcefilter parameter (optional) (default to false)
Boolean *exportresources = true; // export all resource in the virtual cluster (optional) (default to false)
array[String] *resourcefilter = ; // If exportresources is true, only export resources that meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a resource API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'name[noteq]my-resource'. Multiple filters are ANDed. (optional)
String *backupname = backupname_example; // Name of backup archive, if not specified backup-yyyymmddhhmmss will be used (optional)
AdminApi *apiInstance = [[AdminApi alloc] init];
// Exports jobs and resources locally
[apiInstance exportLocalArchiveWith:exportjobs
jobfilter:jobfilter
exportjobresources:exportjobresources
exportresources:exportresources
resourcefilter:resourcefilter
backupname:backupname
completionHandler: ^('String' output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var CdeJobsApi = require('cde_jobs_api');
var api = new CdeJobsApi.AdminApi()
var opts = {
'exportjobs': true, // {{Boolean}} export all jobs in the virtual cluster
'jobfilter': , // {{array[String]}} If exportjobs is true, only export jobs that the meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a job API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'created[gte]2020-01-01'. Multiple filters are ANDed.
'exportjobresources': true, // {{Boolean}} also export resources needed for jobs - selected resources cannot be filtered out by resourcefilter parameter
'exportresources': true, // {{Boolean}} export all resource in the virtual cluster
'resourcefilter': , // {{array[String]}} If exportresources is true, only export resources that meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a resource API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'name[noteq]my-resource'. Multiple filters are ANDed.
'backupname': backupname_example // {{String}} Name of backup archive, if not specified backup-yyyymmddhhmmss will be used
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.exportLocalArchive(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class exportLocalArchiveExample
{
public void main()
{
var apiInstance = new AdminApi();
var exportjobs = true; // Boolean | export all jobs in the virtual cluster (optional) (default to true)
var jobfilter = new array[String](); // array[String] | If exportjobs is true, only export jobs that the meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a job API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'created[gte]2020-01-01'. Multiple filters are ANDed. (optional)
var exportjobresources = true; // Boolean | also export resources needed for jobs - selected resources cannot be filtered out by resourcefilter parameter (optional) (default to false)
var exportresources = true; // Boolean | export all resource in the virtual cluster (optional) (default to false)
var resourcefilter = new array[String](); // array[String] | If exportresources is true, only export resources that meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a resource API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'name[noteq]my-resource'. Multiple filters are ANDed. (optional)
var backupname = backupname_example; // String | Name of backup archive, if not specified backup-yyyymmddhhmmss will be used (optional)
try
{
// Exports jobs and resources locally
'String' result = apiInstance.exportLocalArchive(exportjobs, jobfilter, exportjobresources, exportresources, resourcefilter, backupname);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AdminApi.exportLocalArchive: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAdminApi();
$exportjobs = true; // Boolean | export all jobs in the virtual cluster
$jobfilter = ; // array[String] | If exportjobs is true, only export jobs that the meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a job API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'created[gte]2020-01-01'. Multiple filters are ANDed.
$exportjobresources = true; // Boolean | also export resources needed for jobs - selected resources cannot be filtered out by resourcefilter parameter
$exportresources = true; // Boolean | export all resource in the virtual cluster
$resourcefilter = ; // array[String] | If exportresources is true, only export resources that meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a resource API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'name[noteq]my-resource'. Multiple filters are ANDed.
$backupname = backupname_example; // String | Name of backup archive, if not specified backup-yyyymmddhhmmss will be used
try {
$result = $api_instance->exportLocalArchive($exportjobs, $jobfilter, $exportjobresources, $exportresources, $resourcefilter, $backupname);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminApi->exportLocalArchive: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminApi;
my $api_instance = WWW::SwaggerClient::AdminApi->new();
my $exportjobs = true; # Boolean | export all jobs in the virtual cluster
my $jobfilter = []; # array[String] | If exportjobs is true, only export jobs that the meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a job API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'created[gte]2020-01-01'. Multiple filters are ANDed.
my $exportjobresources = true; # Boolean | also export resources needed for jobs - selected resources cannot be filtered out by resourcefilter parameter
my $exportresources = true; # Boolean | export all resource in the virtual cluster
my $resourcefilter = []; # array[String] | If exportresources is true, only export resources that meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a resource API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'name[noteq]my-resource'. Multiple filters are ANDed.
my $backupname = backupname_example; # String | Name of backup archive, if not specified backup-yyyymmddhhmmss will be used
eval {
my $result = $api_instance->exportLocalArchive(exportjobs => $exportjobs, jobfilter => $jobfilter, exportjobresources => $exportjobresources, exportresources => $exportresources, resourcefilter => $resourcefilter, backupname => $backupname);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AdminApi->exportLocalArchive: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AdminApi()
exportjobs = true # Boolean | export all jobs in the virtual cluster (optional) (default to true)
jobfilter = # array[String] | If exportjobs is true, only export jobs that the meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a job API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'created[gte]2020-01-01'. Multiple filters are ANDed. (optional)
exportjobresources = true # Boolean | also export resources needed for jobs - selected resources cannot be filtered out by resourcefilter parameter (optional) (default to false)
exportresources = true # Boolean | export all resource in the virtual cluster (optional) (default to false)
resourcefilter = # array[String] | If exportresources is true, only export resources that meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a resource API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'name[noteq]my-resource'. Multiple filters are ANDed. (optional)
backupname = backupname_example # String | Name of backup archive, if not specified backup-yyyymmddhhmmss will be used (optional)
try:
# Exports jobs and resources locally
api_response = api_instance.export_local_archive(exportjobs=exportjobs, jobfilter=jobfilter, exportjobresources=exportjobresources, exportresources=exportresources, resourcefilter=resourcefilter, backupname=backupname)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->exportLocalArchive: %s\n" % e)
Parameters
Name | Description |
---|---|
exportjobs |
Boolean
export all jobs in the virtual cluster
|
jobfilter |
array[String]
If exportjobs is true, only export jobs that the meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a job API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'created[gte]2020-01-01'. Multiple filters are ANDed.
|
exportjobresources |
Boolean
also export resources needed for jobs - selected resources cannot be filtered out by resourcefilter parameter
|
exportresources |
Boolean
export all resource in the virtual cluster
|
resourcefilter |
array[String]
If exportresources is true, only export resources that meet the passed filter syntax 'fieldname[operator]argument'. 'fieldname' is the name of a resource API field. 'operator' is one of ('eq', 'noteq', 'lte', 'lt', 'gte', 'gt', 'in', 'notin', 'like', 'rlike'). For example, 'name[noteq]my-resource'. Multiple filters are ANDed.
|
backupname |
String
Name of backup archive, if not specified backup-yyyymmddhhmmss will be used
|