Skip to content

Latest commit

 

History

History
310 lines (227 loc) · 14.1 KB

File metadata and controls

310 lines (227 loc) · 14.1 KB

AuthorizationV1beta1Api

All URIs are relative to https://localhost

Method HTTP request Description
createNamespacedLocalSubjectAccessReview POST /apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews
createSelfSubjectAccessReview POST /apis/authorization.k8s.io/v1beta1/selfsubjectaccessreviews
createSelfSubjectRulesReview POST /apis/authorization.k8s.io/v1beta1/selfsubjectrulesreviews
createSubjectAccessReview POST /apis/authorization.k8s.io/v1beta1/subjectaccessreviews
getAPIResources GET /apis/authorization.k8s.io/v1beta1/

createNamespacedLocalSubjectAccessReview

V1beta1LocalSubjectAccessReview createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, includeUninitialized, pretty)

create a LocalSubjectAccessReview

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

// 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");

AuthorizationV1beta1Api apiInstance = new AuthorizationV1beta1Api();
String namespace = "namespace_example"; // String | object name and auth scope, such as for teams and projects
V1beta1LocalSubjectAccessReview body = new V1beta1LocalSubjectAccessReview(); // V1beta1LocalSubjectAccessReview | 
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
Boolean includeUninitialized = true; // Boolean | If IncludeUninitialized is specified, the object may be returned without completing initialization.
String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
try {
    V1beta1LocalSubjectAccessReview result = apiInstance.createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, includeUninitialized, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthorizationV1beta1Api#createNamespacedLocalSubjectAccessReview");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
namespace String object name and auth scope, such as for teams and projects
body V1beta1LocalSubjectAccessReview
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]
includeUninitialized Boolean If IncludeUninitialized is specified, the object may be returned without completing initialization. [optional]
pretty String If 'true', then the output is pretty printed. [optional]

Return type

V1beta1LocalSubjectAccessReview

Authorization

BearerToken

HTTP request headers

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

createSelfSubjectAccessReview

V1beta1SelfSubjectAccessReview createSelfSubjectAccessReview(body, dryRun, includeUninitialized, pretty)

create a SelfSubjectAccessReview

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

// 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");

AuthorizationV1beta1Api apiInstance = new AuthorizationV1beta1Api();
V1beta1SelfSubjectAccessReview body = new V1beta1SelfSubjectAccessReview(); // V1beta1SelfSubjectAccessReview | 
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
Boolean includeUninitialized = true; // Boolean | If IncludeUninitialized is specified, the object may be returned without completing initialization.
String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
try {
    V1beta1SelfSubjectAccessReview result = apiInstance.createSelfSubjectAccessReview(body, dryRun, includeUninitialized, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthorizationV1beta1Api#createSelfSubjectAccessReview");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body V1beta1SelfSubjectAccessReview
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]
includeUninitialized Boolean If IncludeUninitialized is specified, the object may be returned without completing initialization. [optional]
pretty String If 'true', then the output is pretty printed. [optional]

Return type

V1beta1SelfSubjectAccessReview

Authorization

BearerToken

HTTP request headers

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

createSelfSubjectRulesReview

V1beta1SelfSubjectRulesReview createSelfSubjectRulesReview(body, dryRun, includeUninitialized, pretty)

create a SelfSubjectRulesReview

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

// 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");

AuthorizationV1beta1Api apiInstance = new AuthorizationV1beta1Api();
V1beta1SelfSubjectRulesReview body = new V1beta1SelfSubjectRulesReview(); // V1beta1SelfSubjectRulesReview | 
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
Boolean includeUninitialized = true; // Boolean | If IncludeUninitialized is specified, the object may be returned without completing initialization.
String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
try {
    V1beta1SelfSubjectRulesReview result = apiInstance.createSelfSubjectRulesReview(body, dryRun, includeUninitialized, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthorizationV1beta1Api#createSelfSubjectRulesReview");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body V1beta1SelfSubjectRulesReview
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]
includeUninitialized Boolean If IncludeUninitialized is specified, the object may be returned without completing initialization. [optional]
pretty String If 'true', then the output is pretty printed. [optional]

Return type

V1beta1SelfSubjectRulesReview

Authorization

BearerToken

HTTP request headers

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

createSubjectAccessReview

V1beta1SubjectAccessReview createSubjectAccessReview(body, dryRun, includeUninitialized, pretty)

create a SubjectAccessReview

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

// 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");

AuthorizationV1beta1Api apiInstance = new AuthorizationV1beta1Api();
V1beta1SubjectAccessReview body = new V1beta1SubjectAccessReview(); // V1beta1SubjectAccessReview | 
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
Boolean includeUninitialized = true; // Boolean | If IncludeUninitialized is specified, the object may be returned without completing initialization.
String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
try {
    V1beta1SubjectAccessReview result = apiInstance.createSubjectAccessReview(body, dryRun, includeUninitialized, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthorizationV1beta1Api#createSubjectAccessReview");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body V1beta1SubjectAccessReview
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]
includeUninitialized Boolean If IncludeUninitialized is specified, the object may be returned without completing initialization. [optional]
pretty String If 'true', then the output is pretty printed. [optional]

Return type

V1beta1SubjectAccessReview

Authorization

BearerToken

HTTP request headers

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

getAPIResources

V1APIResourceList getAPIResources()

get available resources

Example

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

// 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");

AuthorizationV1beta1Api apiInstance = new AuthorizationV1beta1Api();
try {
    V1APIResourceList result = apiInstance.getAPIResources();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthorizationV1beta1Api#getAPIResources");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

V1APIResourceList

Authorization

BearerToken

HTTP request headers

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