Skip to content

Latest commit

 

History

History
294 lines (211 loc) · 10.1 KB

AuthorizationV1Api.md

File metadata and controls

294 lines (211 loc) · 10.1 KB

AuthorizationV1Api

All URIs are relative to https://localhost

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

createNamespacedLocalSubjectAccessReview

V1LocalSubjectAccessReview createNamespacedLocalSubjectAccessReview(namespace, body, 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.AuthorizationV1Api;

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

AuthorizationV1Api apiInstance = new AuthorizationV1Api();
String namespace = "namespace_example"; // String | object name and auth scope, such as for teams and projects
V1LocalSubjectAccessReview body = new V1LocalSubjectAccessReview(); // V1LocalSubjectAccessReview | 
String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
try {
    V1LocalSubjectAccessReview result = apiInstance.createNamespacedLocalSubjectAccessReview(namespace, body, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthorizationV1Api#createNamespacedLocalSubjectAccessReview");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
namespace String object name and auth scope, such as for teams and projects
body V1LocalSubjectAccessReview
pretty String If 'true', then the output is pretty printed. [optional]

Return type

V1LocalSubjectAccessReview

Authorization

BearerToken

HTTP request headers

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

createSelfSubjectAccessReview

V1SelfSubjectAccessReview createSelfSubjectAccessReview(body, 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.AuthorizationV1Api;

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

AuthorizationV1Api apiInstance = new AuthorizationV1Api();
V1SelfSubjectAccessReview body = new V1SelfSubjectAccessReview(); // V1SelfSubjectAccessReview | 
String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
try {
    V1SelfSubjectAccessReview result = apiInstance.createSelfSubjectAccessReview(body, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthorizationV1Api#createSelfSubjectAccessReview");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body V1SelfSubjectAccessReview
pretty String If 'true', then the output is pretty printed. [optional]

Return type

V1SelfSubjectAccessReview

Authorization

BearerToken

HTTP request headers

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

createSelfSubjectRulesReview

V1SelfSubjectRulesReview createSelfSubjectRulesReview(body, 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.AuthorizationV1Api;

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

AuthorizationV1Api apiInstance = new AuthorizationV1Api();
V1SelfSubjectRulesReview body = new V1SelfSubjectRulesReview(); // V1SelfSubjectRulesReview | 
String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
try {
    V1SelfSubjectRulesReview result = apiInstance.createSelfSubjectRulesReview(body, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthorizationV1Api#createSelfSubjectRulesReview");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body V1SelfSubjectRulesReview
pretty String If 'true', then the output is pretty printed. [optional]

Return type

V1SelfSubjectRulesReview

Authorization

BearerToken

HTTP request headers

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

createSubjectAccessReview

V1SubjectAccessReview createSubjectAccessReview(body, 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.AuthorizationV1Api;

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

AuthorizationV1Api apiInstance = new AuthorizationV1Api();
V1SubjectAccessReview body = new V1SubjectAccessReview(); // V1SubjectAccessReview | 
String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed.
try {
    V1SubjectAccessReview result = apiInstance.createSubjectAccessReview(body, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthorizationV1Api#createSubjectAccessReview");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body V1SubjectAccessReview
pretty String If 'true', then the output is pretty printed. [optional]

Return type

V1SubjectAccessReview

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.AuthorizationV1Api;

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

AuthorizationV1Api apiInstance = new AuthorizationV1Api();
try {
    V1APIResourceList result = apiInstance.getAPIResources();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AuthorizationV1Api#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