Skip to content

Latest commit

 

History

History
422 lines (334 loc) · 27.2 KB

AuthorizationV1Api.md

File metadata and controls

422 lines (334 loc) · 27.2 KB

AuthorizationV1Api

All URIs are relative to http://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).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).pretty(pretty).execute();

create a LocalSubjectAccessReview

Example

// Import classes:
import client.ApiClient;
import client.ApiException;
import client.Configuration;
import client.auth.*;
import client.models.*;
import client.apis.AuthorizationV1Api;

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

    AuthorizationV1Api apiInstance = new AuthorizationV1Api(defaultClient);
    String namespace = "namespace_example"; // String | object name and auth scope, such as for teams and projects
    V1LocalSubjectAccessReview body = new V1LocalSubjectAccessReview(); // V1LocalSubjectAccessReview | 
    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.
    String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
    try {
      V1LocalSubjectAccessReview result = apiInstance.createNamespacedLocalSubjectAccessReview(namespace, body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .pretty(pretty)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthorizationV1Api#createNamespacedLocalSubjectAccessReview");
      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
namespace String object name and auth scope, such as for teams and projects
body V1LocalSubjectAccessReview
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]
pretty String If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). [optional]

Return type

V1LocalSubjectAccessReview

Authorization

BearerToken

HTTP request headers

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

HTTP response details

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

createSelfSubjectAccessReview

V1SelfSubjectAccessReview createSelfSubjectAccessReview(body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).pretty(pretty).execute();

create a SelfSubjectAccessReview

Example

// Import classes:
import client.ApiClient;
import client.ApiException;
import client.Configuration;
import client.auth.*;
import client.models.*;
import client.apis.AuthorizationV1Api;

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

    AuthorizationV1Api apiInstance = new AuthorizationV1Api(defaultClient);
    V1SelfSubjectAccessReview body = new V1SelfSubjectAccessReview(); // V1SelfSubjectAccessReview | 
    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.
    String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
    try {
      V1SelfSubjectAccessReview result = apiInstance.createSelfSubjectAccessReview(body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .pretty(pretty)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthorizationV1Api#createSelfSubjectAccessReview");
      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
body V1SelfSubjectAccessReview
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]
pretty String If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). [optional]

Return type

V1SelfSubjectAccessReview

Authorization

BearerToken

HTTP request headers

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

HTTP response details

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

createSelfSubjectRulesReview

V1SelfSubjectRulesReview createSelfSubjectRulesReview(body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).pretty(pretty).execute();

create a SelfSubjectRulesReview

Example

// Import classes:
import client.ApiClient;
import client.ApiException;
import client.Configuration;
import client.auth.*;
import client.models.*;
import client.apis.AuthorizationV1Api;

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

    AuthorizationV1Api apiInstance = new AuthorizationV1Api(defaultClient);
    V1SelfSubjectRulesReview body = new V1SelfSubjectRulesReview(); // V1SelfSubjectRulesReview | 
    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.
    String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
    try {
      V1SelfSubjectRulesReview result = apiInstance.createSelfSubjectRulesReview(body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .pretty(pretty)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthorizationV1Api#createSelfSubjectRulesReview");
      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
body V1SelfSubjectRulesReview
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]
pretty String If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). [optional]

Return type

V1SelfSubjectRulesReview

Authorization

BearerToken

HTTP request headers

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

HTTP response details

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

createSubjectAccessReview

V1SubjectAccessReview createSubjectAccessReview(body).dryRun(dryRun).fieldManager(fieldManager).fieldValidation(fieldValidation).pretty(pretty).execute();

create a SubjectAccessReview

Example

// Import classes:
import client.ApiClient;
import client.ApiException;
import client.Configuration;
import client.auth.*;
import client.models.*;
import client.apis.AuthorizationV1Api;

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

    AuthorizationV1Api apiInstance = new AuthorizationV1Api(defaultClient);
    V1SubjectAccessReview body = new V1SubjectAccessReview(); // V1SubjectAccessReview | 
    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.
    String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
    try {
      V1SubjectAccessReview result = apiInstance.createSubjectAccessReview(body)
            .dryRun(dryRun)
            .fieldManager(fieldManager)
            .fieldValidation(fieldValidation)
            .pretty(pretty)
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthorizationV1Api#createSubjectAccessReview");
      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
body V1SubjectAccessReview
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]
pretty String If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). [optional]

Return type

V1SubjectAccessReview

Authorization

BearerToken

HTTP request headers

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

HTTP response details

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

getAPIResources

V1APIResourceList getAPIResources().execute();

get available resources

Example

// Import classes:
import client.ApiClient;
import client.ApiException;
import client.Configuration;
import client.auth.*;
import client.models.*;
import client.apis.AuthorizationV1Api;

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

    AuthorizationV1Api apiInstance = new AuthorizationV1Api(defaultClient);
    try {
      V1APIResourceList result = apiInstance.getAPIResources()
            .execute();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthorizationV1Api#getAPIResources");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

V1APIResourceList

Authorization

BearerToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -