AsyncAccessKeys
Bases: AsyncBaseRoute
A class for managing access keys on the Outline VPN server asynchronously.
Provides methods to retrieve, create, rename, delete, and set data limits on access keys, which are used to control access to the Outline VPN server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
management_url
|
str
|
The management URL used to communicate with the Outline server API. |
required |
ssl_verify
|
bool
|
Flag to enable or disable SSL certificate verification. Default is False. |
False
|
Source code in outline_vpn_api_client/async_client.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | |
change_data_limit(id, limit)
async
Sets a data transfer limit for the specified access key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
The ID of the access key. |
required |
limit
|
int
|
The data transfer limit in bytes. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the data transfer limit was successfully set. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 | |
create(name, method='aes-192-gcm', password=None, port=None, limit=None)
async
Creates a new access key on the Outline VPN server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name to assign to the new access key. |
required |
method
|
str
|
The encryption method to use for the access key. Default is "aes-192-gcm". |
'aes-192-gcm'
|
password
|
str
|
A custom password for the access key. If not provided, the server generates one. |
None
|
port
|
int
|
A custom port for the access key. If not provided, the server default port is used. |
None
|
limit
|
int
|
The data transfer limit for the access key in bytes. If not provided, the key will have no transfer limit. |
None
|
Returns:
| Type | Description |
|---|---|
AccessKey
|
models.AccessKey: The newly created access key. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | |
create_with_special_id(id, name, method='aes-192-gcm', password=None, port=None, limit=None)
async
Creates a new access key with a specific identifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
The custom ID to assign to the new access key. |
required |
name
|
str
|
The name to assign to the new access key. |
required |
method
|
str
|
The encryption method to use for the access key. Default is "aes-192-gcm". |
'aes-192-gcm'
|
password
|
str
|
A custom password for the access key. If not provided, the server generates one. |
None
|
port
|
int
|
A custom port for the access key. If not provided, the server default port is used. |
None
|
limit
|
int
|
The data transfer limit for the access key in bytes. If not provided, the key will have no transfer limit. |
None
|
Returns:
| Type | Description |
|---|---|
AccessKey
|
models.AccessKey: The newly created access key. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | |
delete(id)
async
Deletes an access key on the Outline VPN server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
The ID of the access key to be deleted. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the access key was successfully deleted. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | |
get(id)
async
Retrieves the details of a specific access key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
The ID of the access key to retrieve. |
required |
Returns:
| Type | Description |
|---|---|
AccessKey
|
models.AccessKey: Details of the requested access key. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | |
get_all()
async
Lists all the access keys on the Outline VPN server.
Returns:
| Type | Description |
|---|---|
AccessKeyList
|
models.AccessKeyList: All access keys on the server. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | |
remove_data_limit(id)
async
Removes the data transfer limit on the specified access key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
The ID of the access key. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the data transfer limit was successfully removed. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | |
rename(id, name)
async
Renames an existing access key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
The ID of the access key to be renamed. |
required |
name
|
str
|
The new name to assign to the access key. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the access key was successfully renamed. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | |