Skip to content

Latest commit

 

History

History
323 lines (215 loc) · 8.11 KB

IscsiAuthApi.md

File metadata and controls

323 lines (215 loc) · 8.11 KB

RMoore\Truenas\IscsiAuthApi

All URIs are relative to https://truenas.local/api/v2.0.

Method HTTP request Description
iscsiAuthGet() GET /iscsi/auth
iscsiAuthIdIdDelete() DELETE /iscsi/auth/id/{id}
iscsiAuthIdIdGet() GET /iscsi/auth/id/{id}
iscsiAuthIdIdPut() PUT /iscsi/auth/id/{id}
iscsiAuthPost() POST /iscsi/auth

iscsiAuthGet()

iscsiAuthGet($limit, $offset, $count, $sort)

query-options.extra can be specified as query parameters with prefixing them with extra. prefix. For example, extra.retrieve_properties=false will pass retrieve_properties as an extra argument to pool/dataset endpoint.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new RMoore\Truenas\Api\IscsiAuthApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$limit = 56; // int
$offset = 56; // int
$count = True; // bool
$sort = 'sort_example'; // string

try {
    $apiInstance->iscsiAuthGet($limit, $offset, $count, $sort);
} catch (Exception $e) {
    echo 'Exception when calling IscsiAuthApi->iscsiAuthGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
limit int [optional]
offset int [optional]
count bool [optional]
sort string [optional]

Return type

void (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

iscsiAuthIdIdDelete()

iscsiAuthIdIdDelete($id)

Delete iSCSI Authorized Access of id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new RMoore\Truenas\Api\IscsiAuthApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int

try {
    $apiInstance->iscsiAuthIdIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling IscsiAuthApi->iscsiAuthIdIdDelete: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

iscsiAuthIdIdGet()

iscsiAuthIdIdGet($id)

query-options.extra can be specified as query parameters with prefixing them with extra. prefix. For example, extra.retrieve_properties=false will pass retrieve_properties as an extra argument to pool/dataset endpoint.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new RMoore\Truenas\Api\IscsiAuthApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int

try {
    $apiInstance->iscsiAuthIdIdGet($id);
} catch (Exception $e) {
    echo 'Exception when calling IscsiAuthApi->iscsiAuthIdIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

iscsiAuthIdIdPut()

iscsiAuthIdIdPut($id)

Update iSCSI Authorized Access of id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new RMoore\Truenas\Api\IscsiAuthApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int

try {
    $apiInstance->iscsiAuthIdIdPut($id);
} catch (Exception $e) {
    echo 'Exception when calling IscsiAuthApi->iscsiAuthIdIdPut: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

iscsiAuthPost()

iscsiAuthPost($iscsi_auth_create0)

Create an iSCSI Authorized Access. tag should be unique among all configured iSCSI Authorized Accesses. secret and peersecret should have length between 12-16 letters inclusive. peeruser and peersecret are provided only when configuring mutual CHAP. peersecret should not be similar to secret.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new RMoore\Truenas\Api\IscsiAuthApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$iscsi_auth_create0 = new \RMoore\Truenas\Model\IscsiAuthCreate0(); // \RMoore\Truenas\Model\IscsiAuthCreate0

try {
    $apiInstance->iscsiAuthPost($iscsi_auth_create0);
} catch (Exception $e) {
    echo 'Exception when calling IscsiAuthApi->iscsiAuthPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
iscsi_auth_create0 \RMoore\Truenas\Model\IscsiAuthCreate0 [optional]

Return type

void (empty response body)

Authorization

basic

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]