All URIs are relative to http://podman.io
| Method | HTTP request | Description |
|---|---|---|
| secretCreate | POST /secrets/create | Create a secret |
| secretDelete | DELETE /secrets/{name} | Remove secret |
| secretInspect | GET /secrets/{name} | Inspect secret |
| secretList | GET /secrets | List secrets |
ContainerUpdateLibpod201Response secretCreate().create(create).execute();
Create a secret
// Import classes:
import io.github.pod4dev.libpodj.ApiClient;
import io.github.pod4dev.libpodj.ApiException;
import io.github.pod4dev.libpodj.Configuration;
import io.github.pod4dev.libpodj.models.*;
import io.github.pod4dev.libpodj.api.SecretsCompatApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://podman.io");
SecretsCompatApi apiInstance = new SecretsCompatApi(defaultClient);
SecretCreate create = new SecretCreate(); // SecretCreate | attributes for creating a secret
try {
ContainerUpdateLibpod201Response result = apiInstance.secretCreate()
.create(create)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SecretsCompatApi#secretCreate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| create | SecretCreate | attributes for creating a secret | [optional] |
ContainerUpdateLibpod201Response
No authorization required
- Content-Type: application/json, application/x-tar
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Secret create response | - |
| 409 | Secret in use | - |
| 500 | Internal server error | - |
secretDelete(name).execute();
Remove secret
// Import classes:
import io.github.pod4dev.libpodj.ApiClient;
import io.github.pod4dev.libpodj.ApiException;
import io.github.pod4dev.libpodj.Configuration;
import io.github.pod4dev.libpodj.models.*;
import io.github.pod4dev.libpodj.api.SecretsCompatApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://podman.io");
SecretsCompatApi apiInstance = new SecretsCompatApi(defaultClient);
String name = "name_example"; // String | the name or ID of the secret
try {
apiInstance.secretDelete(name)
.execute();
} catch (ApiException e) {
System.err.println("Exception when calling SecretsCompatApi#secretDelete");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| name | String | the name or ID of the secret |
null (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | no error | - |
| 404 | No such secret | - |
| 500 | Internal server error | - |
SecretInfoReportCompat secretInspect(name).execute();
Inspect secret
// Import classes:
import io.github.pod4dev.libpodj.ApiClient;
import io.github.pod4dev.libpodj.ApiException;
import io.github.pod4dev.libpodj.Configuration;
import io.github.pod4dev.libpodj.models.*;
import io.github.pod4dev.libpodj.api.SecretsCompatApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://podman.io");
SecretsCompatApi apiInstance = new SecretsCompatApi(defaultClient);
String name = "name_example"; // String | the name or ID of the secret
try {
SecretInfoReportCompat result = apiInstance.secretInspect(name)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SecretsCompatApi#secretInspect");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| name | String | the name or ID of the secret |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Secret inspect compat | - |
| 404 | No such secret | - |
| 500 | Internal server error | - |
List<SecretInfoReportCompat> secretList().filters(filters).execute();
List secrets
Returns a list of secrets
// Import classes:
import io.github.pod4dev.libpodj.ApiClient;
import io.github.pod4dev.libpodj.ApiException;
import io.github.pod4dev.libpodj.Configuration;
import io.github.pod4dev.libpodj.models.*;
import io.github.pod4dev.libpodj.api.SecretsCompatApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://podman.io");
SecretsCompatApi apiInstance = new SecretsCompatApi(defaultClient);
String filters = "filters_example"; // String | JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Currently available filters: - `name=[name]` Matches secrets name (accepts regex). - `id=[id]` Matches for full or partial ID.
try {
List<SecretInfoReportCompat> result = apiInstance.secretList()
.filters(filters)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SecretsCompatApi#secretList");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| filters | String | JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Currently available filters: - `name=[name]` Matches secrets name (accepts regex). - `id=[id]` Matches for full or partial ID. | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Secret list response | - |
| 500 | Internal server error | - |