Skip to content

Latest commit

 

History

History
2438 lines (1975 loc) · 167 KB

CustomObjectsApi.md

File metadata and controls

2438 lines (1975 loc) · 167 KB

CustomObjectsApi

All URIs are relative to http://localhost

Method HTTP request Description
createClusterCustomObject POST /apis/{group}/{version}/{plural}
createNamespacedCustomObject POST /apis/{group}/{version}/namespaces/{namespace}/{plural}
deleteClusterCustomObject DELETE /apis/{group}/{version}/{plural}/{name}
deleteCollectionClusterCustomObject DELETE /apis/{group}/{version}/{plural}
deleteCollectionNamespacedCustomObject DELETE /apis/{group}/{version}/namespaces/{namespace}/{plural}
deleteNamespacedCustomObject DELETE /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}
getAPIResources GET /apis/{group}/{version}
getClusterCustomObject GET /apis/{group}/{version}/{plural}/{name}
getClusterCustomObjectScale GET /apis/{group}/{version}/{plural}/{name}/scale
getClusterCustomObjectStatus GET /apis/{group}/{version}/{plural}/{name}/status
getNamespacedCustomObject GET /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}
getNamespacedCustomObjectScale GET /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale
getNamespacedCustomObjectStatus GET /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status
listClusterCustomObject GET /apis/{group}/{version}/{plural}
listNamespacedCustomObject GET /apis/{group}/{version}/namespaces/{namespace}/{plural}
patchClusterCustomObject PATCH /apis/{group}/{version}/{plural}/{name}
patchClusterCustomObjectScale PATCH /apis/{group}/{version}/{plural}/{name}/scale
patchClusterCustomObjectStatus PATCH /apis/{group}/{version}/{plural}/{name}/status
patchNamespacedCustomObject PATCH /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}
patchNamespacedCustomObjectScale PATCH /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale
patchNamespacedCustomObjectStatus PATCH /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status
replaceClusterCustomObject PUT /apis/{group}/{version}/{plural}/{name}
replaceClusterCustomObjectScale PUT /apis/{group}/{version}/{plural}/{name}/scale
replaceClusterCustomObjectStatus PUT /apis/{group}/{version}/{plural}/{name}/status
replaceNamespacedCustomObject PUT /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}
replaceNamespacedCustomObjectScale PUT /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale
replaceNamespacedCustomObjectStatus PUT /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status

createClusterCustomObject

Object createClusterCustomObject(group, version, plural, body).pretty(pretty).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).execute();

Creates a cluster scoped Custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | The custom resource's group name
    String version = "version_example"; // String | The custom resource's version
    String plural = "plural_example"; // String | The custom resource's plural name. For TPRs this would be lowercase plural kind.
    Object body = null; // Object | The JSON schema of the Resource to create.
    String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    try {
      Object result = apiInstance.createClusterCustomObject(group, version, plural, body)
            .pretty(pretty)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#createClusterCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String The custom resource's group name
version String The custom resource's version
plural String The custom resource's plural name. For TPRs this would be lowercase plural kind.
body Object The JSON schema of the Resource to create.
pretty String If 'true', then the output is pretty printed. [optional]
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Created -
401 Unauthorized -

createNamespacedCustomObject

Object createNamespacedCustomObject(group, version, namespace, plural, body).pretty(pretty).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).execute();

Creates a namespace scoped Custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | The custom resource's group name
    String version = "version_example"; // String | The custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | The custom resource's plural name. For TPRs this would be lowercase plural kind.
    Object body = null; // Object | The JSON schema of the Resource to create.
    String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    try {
      Object result = apiInstance.createNamespacedCustomObject(group, version, namespace, plural, body)
            .pretty(pretty)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#createNamespacedCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String The custom resource's group name
version String The custom resource's version
namespace String The custom resource's namespace
plural String The custom resource's plural name. For TPRs this would be lowercase plural kind.
body Object The JSON schema of the Resource to create.
pretty String If 'true', then the output is pretty printed. [optional]
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Created -
401 Unauthorized -

deleteClusterCustomObject

Object deleteClusterCustomObject(group, version, plural, name).gracePeriodSeconds(gracePeriodSeconds).orphanDependents(orphanDependents).propagationPolicy(propagationPolicy).dryRun(dryRun).body(body).execute();

Deletes the specified cluster scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String plural = "plural_example"; // String | the custom object's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Integer gracePeriodSeconds = 56; // Integer | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
    Boolean orphanDependents = true; // Boolean | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
    String propagationPolicy = "propagationPolicy_example"; // String | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    V1DeleteOptions body = new V1DeleteOptions(); // V1DeleteOptions | 
    try {
      Object result = apiInstance.deleteClusterCustomObject(group, version, plural, name)
            .gracePeriodSeconds(gracePeriodSeconds)
            .orphanDependents(orphanDependents)
            .propagationPolicy(propagationPolicy)
            .dryRun(dryRun)
            .body(body)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#deleteClusterCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
plural String the custom object's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
gracePeriodSeconds Integer The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. [optional]
orphanDependents Boolean Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. [optional]
propagationPolicy String Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. [optional]
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
body V1DeleteOptions [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

deleteCollectionClusterCustomObject

Object deleteCollectionClusterCustomObject(group, version, plural).pretty(pretty).labelSelector(labelSelector).gracePeriodSeconds(gracePeriodSeconds).orphanDependents(orphanDependents).propagationPolicy(propagationPolicy).dryRun(dryRun).body(body).execute();

Delete collection of cluster scoped custom objects

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | The custom resource's group name
    String version = "version_example"; // String | The custom resource's version
    String plural = "plural_example"; // String | The custom resource's plural name. For TPRs this would be lowercase plural kind.
    String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
    String labelSelector = "labelSelector_example"; // String | A selector to restrict the list of returned objects by their labels. Defaults to everything.
    Integer gracePeriodSeconds = 56; // Integer | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
    Boolean orphanDependents = true; // Boolean | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
    String propagationPolicy = "propagationPolicy_example"; // String | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    V1DeleteOptions body = new V1DeleteOptions(); // V1DeleteOptions | 
    try {
      Object result = apiInstance.deleteCollectionClusterCustomObject(group, version, plural)
            .pretty(pretty)
            .labelSelector(labelSelector)
            .gracePeriodSeconds(gracePeriodSeconds)
            .orphanDependents(orphanDependents)
            .propagationPolicy(propagationPolicy)
            .dryRun(dryRun)
            .body(body)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#deleteCollectionClusterCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String The custom resource's group name
version String The custom resource's version
plural String The custom resource's plural name. For TPRs this would be lowercase plural kind.
pretty String If 'true', then the output is pretty printed. [optional]
labelSelector String A selector to restrict the list of returned objects by their labels. Defaults to everything. [optional]
gracePeriodSeconds Integer The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. [optional]
orphanDependents Boolean Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. [optional]
propagationPolicy String Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. [optional]
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
body V1DeleteOptions [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

deleteCollectionNamespacedCustomObject

Object deleteCollectionNamespacedCustomObject(group, version, namespace, plural).pretty(pretty).labelSelector(labelSelector).gracePeriodSeconds(gracePeriodSeconds).orphanDependents(orphanDependents).propagationPolicy(propagationPolicy).dryRun(dryRun).body(body).execute();

Delete collection of namespace scoped custom objects

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | The custom resource's group name
    String version = "version_example"; // String | The custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | The custom resource's plural name. For TPRs this would be lowercase plural kind.
    String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
    String labelSelector = "labelSelector_example"; // String | A selector to restrict the list of returned objects by their labels. Defaults to everything.
    Integer gracePeriodSeconds = 56; // Integer | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
    Boolean orphanDependents = true; // Boolean | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
    String propagationPolicy = "propagationPolicy_example"; // String | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    V1DeleteOptions body = new V1DeleteOptions(); // V1DeleteOptions | 
    try {
      Object result = apiInstance.deleteCollectionNamespacedCustomObject(group, version, namespace, plural)
            .pretty(pretty)
            .labelSelector(labelSelector)
            .gracePeriodSeconds(gracePeriodSeconds)
            .orphanDependents(orphanDependents)
            .propagationPolicy(propagationPolicy)
            .dryRun(dryRun)
            .body(body)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#deleteCollectionNamespacedCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String The custom resource's group name
version String The custom resource's version
namespace String The custom resource's namespace
plural String The custom resource's plural name. For TPRs this would be lowercase plural kind.
pretty String If 'true', then the output is pretty printed. [optional]
labelSelector String A selector to restrict the list of returned objects by their labels. Defaults to everything. [optional]
gracePeriodSeconds Integer The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. [optional]
orphanDependents Boolean Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. [optional]
propagationPolicy String Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. [optional]
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
body V1DeleteOptions [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

deleteNamespacedCustomObject

Object deleteNamespacedCustomObject(group, version, namespace, plural, name).gracePeriodSeconds(gracePeriodSeconds).orphanDependents(orphanDependents).propagationPolicy(propagationPolicy).dryRun(dryRun).body(body).execute();

Deletes the specified namespace scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Integer gracePeriodSeconds = 56; // Integer | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
    Boolean orphanDependents = true; // Boolean | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
    String propagationPolicy = "propagationPolicy_example"; // String | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    V1DeleteOptions body = new V1DeleteOptions(); // V1DeleteOptions | 
    try {
      Object result = apiInstance.deleteNamespacedCustomObject(group, version, namespace, plural, name)
            .gracePeriodSeconds(gracePeriodSeconds)
            .orphanDependents(orphanDependents)
            .propagationPolicy(propagationPolicy)
            .dryRun(dryRun)
            .body(body)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#deleteNamespacedCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
namespace String The custom resource's namespace
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
gracePeriodSeconds Integer The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. [optional]
orphanDependents Boolean Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. [optional]
propagationPolicy String Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. [optional]
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
body V1DeleteOptions [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

getAPIResources

V1APIResourceList getAPIResources(group, version).execute();

get available resources

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | The custom resource's group name
    String version = "version_example"; // String | The custom resource's version
    try {
      V1APIResourceList result = apiInstance.getAPIResources(group, version)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#getAPIResources");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String The custom resource's group name
version String The custom resource's version

Return type

V1APIResourceList

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

getClusterCustomObject

Object getClusterCustomObject(group, version, plural, name).execute();

Returns a cluster scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String plural = "plural_example"; // String | the custom object's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    try {
      Object result = apiInstance.getClusterCustomObject(group, version, plural, name)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#getClusterCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
plural String the custom object's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A single Resource -
401 Unauthorized -

getClusterCustomObjectScale

Object getClusterCustomObjectScale(group, version, plural, name).execute();

read scale of the specified custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    try {
      Object result = apiInstance.getClusterCustomObjectScale(group, version, plural, name)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#getClusterCustomObjectScale");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

getClusterCustomObjectStatus

Object getClusterCustomObjectStatus(group, version, plural, name).execute();

read status of the specified cluster scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    try {
      Object result = apiInstance.getClusterCustomObjectStatus(group, version, plural, name)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#getClusterCustomObjectStatus");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

getNamespacedCustomObject

Object getNamespacedCustomObject(group, version, namespace, plural, name).execute();

Returns a namespace scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    try {
      Object result = apiInstance.getNamespacedCustomObject(group, version, namespace, plural, name)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#getNamespacedCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
namespace String The custom resource's namespace
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A single Resource -
401 Unauthorized -

getNamespacedCustomObjectScale

Object getNamespacedCustomObjectScale(group, version, namespace, plural, name).execute();

read scale of the specified namespace scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    try {
      Object result = apiInstance.getNamespacedCustomObjectScale(group, version, namespace, plural, name)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#getNamespacedCustomObjectScale");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
namespace String The custom resource's namespace
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

getNamespacedCustomObjectStatus

Object getNamespacedCustomObjectStatus(group, version, namespace, plural, name).execute();

read status of the specified namespace scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    try {
      Object result = apiInstance.getNamespacedCustomObjectStatus(group, version, namespace, plural, name)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#getNamespacedCustomObjectStatus");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
namespace String The custom resource's namespace
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

listClusterCustomObject

Object listClusterCustomObject(group, version, plural).pretty(pretty).allowWatchBookmarks(allowWatchBookmarks)._continue(_continue).fieldSelector(fieldSelector).labelSelector(labelSelector).limit(limit).resourceVersion(resourceVersion).resourceVersionMatch(resourceVersionMatch).timeoutSeconds(timeoutSeconds).watch(watch).execute();

list or watch cluster scoped custom objects

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | The custom resource's group name
    String version = "version_example"; // String | The custom resource's version
    String plural = "plural_example"; // String | The custom resource's plural name. For TPRs this would be lowercase plural kind.
    String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
    Boolean allowWatchBookmarks = true; // Boolean | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
    String _continue = "_continue_example"; // String | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".  This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
    String fieldSelector = "fieldSelector_example"; // String | A selector to restrict the list of returned objects by their fields. Defaults to everything.
    String labelSelector = "labelSelector_example"; // String | A selector to restrict the list of returned objects by their labels. Defaults to everything.
    Integer limit = 56; // Integer | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.  The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
    String resourceVersion = "resourceVersion_example"; // String | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
    String resourceVersionMatch = "resourceVersionMatch_example"; // String | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset
    Integer timeoutSeconds = 56; // Integer | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
    Boolean watch = true; // Boolean | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
    try {
      Object result = apiInstance.listClusterCustomObject(group, version, plural)
            .pretty(pretty)
            .allowWatchBookmarks(allowWatchBookmarks)
            ._continue(_continue)
            .fieldSelector(fieldSelector)
            .labelSelector(labelSelector)
            .limit(limit)
            .resourceVersion(resourceVersion)
            .resourceVersionMatch(resourceVersionMatch)
            .timeoutSeconds(timeoutSeconds)
            .watch(watch)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#listClusterCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String The custom resource's group name
version String The custom resource's version
plural String The custom resource's plural name. For TPRs this would be lowercase plural kind.
pretty String If 'true', then the output is pretty printed. [optional]
allowWatchBookmarks Boolean allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. [optional]
_continue String The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. [optional]
fieldSelector String A selector to restrict the list of returned objects by their fields. Defaults to everything. [optional]
labelSelector String A selector to restrict the list of returned objects by their labels. Defaults to everything. [optional]
limit Integer limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. [optional]
resourceVersion String When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. [optional]
resourceVersionMatch String resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset [optional]
timeoutSeconds Integer Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. [optional]
watch Boolean Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/json;stream=watch

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

listNamespacedCustomObject

Object listNamespacedCustomObject(group, version, namespace, plural).pretty(pretty).allowWatchBookmarks(allowWatchBookmarks)._continue(_continue).fieldSelector(fieldSelector).labelSelector(labelSelector).limit(limit).resourceVersion(resourceVersion).resourceVersionMatch(resourceVersionMatch).timeoutSeconds(timeoutSeconds).watch(watch).execute();

list or watch namespace scoped custom objects

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | The custom resource's group name
    String version = "version_example"; // String | The custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | The custom resource's plural name. For TPRs this would be lowercase plural kind.
    String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
    Boolean allowWatchBookmarks = true; // Boolean | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
    String _continue = "_continue_example"; // String | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".  This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
    String fieldSelector = "fieldSelector_example"; // String | A selector to restrict the list of returned objects by their fields. Defaults to everything.
    String labelSelector = "labelSelector_example"; // String | A selector to restrict the list of returned objects by their labels. Defaults to everything.
    Integer limit = 56; // Integer | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.  The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
    String resourceVersion = "resourceVersion_example"; // String | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
    String resourceVersionMatch = "resourceVersionMatch_example"; // String | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset
    Integer timeoutSeconds = 56; // Integer | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
    Boolean watch = true; // Boolean | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
    try {
      Object result = apiInstance.listNamespacedCustomObject(group, version, namespace, plural)
            .pretty(pretty)
            .allowWatchBookmarks(allowWatchBookmarks)
            ._continue(_continue)
            .fieldSelector(fieldSelector)
            .labelSelector(labelSelector)
            .limit(limit)
            .resourceVersion(resourceVersion)
            .resourceVersionMatch(resourceVersionMatch)
            .timeoutSeconds(timeoutSeconds)
            .watch(watch)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#listNamespacedCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String The custom resource's group name
version String The custom resource's version
namespace String The custom resource's namespace
plural String The custom resource's plural name. For TPRs this would be lowercase plural kind.
pretty String If 'true', then the output is pretty printed. [optional]
allowWatchBookmarks Boolean allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. [optional]
_continue String The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. [optional]
fieldSelector String A selector to restrict the list of returned objects by their fields. Defaults to everything. [optional]
labelSelector String A selector to restrict the list of returned objects by their labels. Defaults to everything. [optional]
limit Integer limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. [optional]
resourceVersion String When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. [optional]
resourceVersionMatch String resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset [optional]
timeoutSeconds Integer Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. [optional]
watch Boolean Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/json;stream=watch

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

patchClusterCustomObject

Object patchClusterCustomObject(group, version, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).force(force).execute();

patch the specified cluster scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String plural = "plural_example"; // String | the custom object's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | The JSON schema of the Resource to patch.
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    Boolean force = true; // Boolean | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
    try {
      Object result = apiInstance.patchClusterCustomObject(group, version, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .force(force)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#patchClusterCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
plural String the custom object's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object The JSON schema of the Resource to patch.
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]
force Boolean Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

patchClusterCustomObjectScale

Object patchClusterCustomObjectScale(group, version, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).force(force).execute();

partially update scale of the specified cluster scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | 
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    Boolean force = true; // Boolean | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
    try {
      Object result = apiInstance.patchClusterCustomObjectScale(group, version, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .force(force)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#patchClusterCustomObjectScale");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]
force Boolean Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

patchClusterCustomObjectStatus

Object patchClusterCustomObjectStatus(group, version, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).force(force).execute();

partially update status of the specified cluster scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | 
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    Boolean force = true; // Boolean | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
    try {
      Object result = apiInstance.patchClusterCustomObjectStatus(group, version, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .force(force)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#patchClusterCustomObjectStatus");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]
force Boolean Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

patchNamespacedCustomObject

Object patchNamespacedCustomObject(group, version, namespace, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).force(force).execute();

patch the specified namespace scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | The JSON schema of the Resource to patch.
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    Boolean force = true; // Boolean | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
    try {
      Object result = apiInstance.patchNamespacedCustomObject(group, version, namespace, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .force(force)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#patchNamespacedCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
namespace String The custom resource's namespace
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object The JSON schema of the Resource to patch.
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]
force Boolean Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

patchNamespacedCustomObjectScale

Object patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).force(force).execute();

partially update scale of the specified namespace scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | 
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    Boolean force = true; // Boolean | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
    try {
      Object result = apiInstance.patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .force(force)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#patchNamespacedCustomObjectScale");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
namespace String The custom resource's namespace
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]
force Boolean Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

patchNamespacedCustomObjectStatus

Object patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).force(force).execute();

partially update status of the specified namespace scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | 
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    Boolean force = true; // Boolean | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
    try {
      Object result = apiInstance.patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .force(force)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#patchNamespacedCustomObjectStatus");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
namespace String The custom resource's namespace
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]
force Boolean Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

replaceClusterCustomObject

Object replaceClusterCustomObject(group, version, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).execute();

replace the specified cluster scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String plural = "plural_example"; // String | the custom object's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | The JSON schema of the Resource to replace.
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    try {
      Object result = apiInstance.replaceClusterCustomObject(group, version, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#replaceClusterCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
plural String the custom object's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object The JSON schema of the Resource to replace.
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

replaceClusterCustomObjectScale

Object replaceClusterCustomObjectScale(group, version, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).execute();

replace scale of the specified cluster scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | 
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    try {
      Object result = apiInstance.replaceClusterCustomObjectScale(group, version, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#replaceClusterCustomObjectScale");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
201 Created -
401 Unauthorized -

replaceClusterCustomObjectStatus

Object replaceClusterCustomObjectStatus(group, version, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).execute();

replace status of the cluster scoped specified custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | 
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    try {
      Object result = apiInstance.replaceClusterCustomObjectStatus(group, version, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#replaceClusterCustomObjectStatus");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
201 Created -
401 Unauthorized -

replaceNamespacedCustomObject

Object replaceNamespacedCustomObject(group, version, namespace, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).execute();

replace the specified namespace scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | The JSON schema of the Resource to replace.
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    try {
      Object result = apiInstance.replaceNamespacedCustomObject(group, version, namespace, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#replaceNamespacedCustomObject");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
namespace String The custom resource's namespace
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object The JSON schema of the Resource to replace.
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

replaceNamespacedCustomObjectScale

Object replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).execute();

replace scale of the specified namespace scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | 
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    try {
      Object result = apiInstance.replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#replaceNamespacedCustomObjectScale");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
namespace String The custom resource's namespace
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
201 Created -
401 Unauthorized -

replaceNamespacedCustomObjectStatus

Object replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).execute();

replace status of the specified namespace scoped custom object

Example

// Import classes:
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.auth.*;
import io.kubernetes.client.openapi.models.*;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure API key authorization: BearerToken
    ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken");
    BearerToken.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //BearerToken.setApiKeyPrefix("Token");

    CustomObjectsApi apiInstance = new CustomObjectsApi(defaultClient);
    String group = "group_example"; // String | the custom resource's group
    String version = "version_example"; // String | the custom resource's version
    String namespace = "namespace_example"; // String | The custom resource's namespace
    String plural = "plural_example"; // String | the custom resource's plural name. For TPRs this would be lowercase plural kind.
    String name = "name_example"; // String | the custom object's name
    Object body = null; // Object | 
    String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
    String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
    String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
    try {
      Object result = apiInstance.replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CustomObjectsApi#replaceNamespacedCustomObjectStatus");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
group String the custom resource's group
version String the custom resource's version
namespace String The custom resource's namespace
plural String the custom resource's plural name. For TPRs this would be lowercase plural kind.
name String the custom object's name
body Object
dryRun String When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed [optional]
fieldManager String fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. [optional]
fieldValidation String fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) [optional]

Return type

Object

Authorization

BearerToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml, application/vnd.kubernetes.protobuf

HTTP response details

Status code Description Response headers
200 OK -
201 Created -
401 Unauthorized -