Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #18 from rapid7/release/6.5.50
Browse files Browse the repository at this point in the history
Update generated library to version: 1.0.0-6.5.50
  • Loading branch information
zyoutz-r7 authored Feb 15, 2019
2 parents a730fc8 + c0ac0e9 commit f8dd9d9
Show file tree
Hide file tree
Showing 17 changed files with 856 additions and 17 deletions.
2 changes: 1 addition & 1 deletion api-files/console-swagger.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions docs/Repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Repeat

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**day_of_week** | **str** | The day of the week the scheduled task should repeat. This property only applies to schedules with a `every` value of `\"day-of-month\"`. | [optional]
**every** | **str** | The frequency schedule repeats. Each value represents a different unit of time and is used in conjunction with the property `interval`. For example, a schedule can repeat hourly, daily, monthly, etc. The following table describes each supported value: | Value | Description | | ---------- | ---------------- | | hour | Specifies the schedule repeats in hourly increments. | | day | Specifies the schedule repeats in daily increments. | | week | Specifies the schedule repeats in weekly increments. | | date-of-month | Specifies the schedule repeats nth day of the `interval` month. Requires the property `dateOfMonth` to be specified. For example, if `dateOfMonth` is `17` and the `interval` is `2`, then the schedule will repeat every 2 months on the 17th day of the month. | | day-of-month | Specifies the schedule repeats on a monthly interval but instead of a specific date being specified, the day of the week and week of the month are specified. Requires the properties `dayOfWeek` and `weekOfMonth` to be specified. For example, if `dayOfWeek` is `\"friday\"`, `weekOfMonth` is `3`, and the `interval` is `4`, then the schedule will repeat every 4 months on the 3rd Friday of the month. | |
**interval** | **int** | The interval time the schedule should repeat. The is depends on the value set in `every`. For example, if the value in property `every` is set to `\"day\"` and `interval` is set to `2`, then the schedule will repeat every 2 days. |
**last_day_of_month** | **bool** | Whether to run the scheduled task on the last day of the month. | [optional]
**week_of_month** | **int** | The week of the month the scheduled task should repeat. For This property only applies to schedules with a `every` value of `\"day-of-month\"`. Each week of the month is counted in 7-day increments. For example, week 1 consists of days 1-7 of the month while week 2 consists of days 8-14 of the month and so forth. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


6 changes: 4 additions & 2 deletions docs/ScanApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **start_scan**
> CreatedReferenceScanIDLink start_scan(id, scan=scan)
> CreatedReferenceScanIDLink start_scan(id, override_blackout=override_blackout, scan=scan)
Site Scans

Expand All @@ -237,11 +237,12 @@ from pprint import pprint
# create an instance of the API class
api_instance = rapid7vmconsole.ScanApi()
id = 56 # int | The identifier of the site.
override_blackout = false # bool | ${override.blackout} (optional) (default to false)
scan = rapid7vmconsole.AdhocScan() # AdhocScan | The details for the scan. (optional)

try:
# Site Scans
api_response = api_instance.start_scan(id, scan=scan)
api_response = api_instance.start_scan(id, override_blackout=override_blackout, scan=scan)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanApi->start_scan: %s\n" % e)
Expand All @@ -252,6 +253,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **int**| The identifier of the site. |
**override_blackout** | **bool**| ${override.blackout} | [optional] [default to false]
**scan** | [**AdhocScan**](AdhocScan.md)| The details for the scan. | [optional]

### Return type
Expand Down
180 changes: 180 additions & 0 deletions docs/ScanEngineApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ Method | HTTP request | Description
[**add_scan_engine_pool_scan_engine**](ScanEngineApi.md#add_scan_engine_pool_scan_engine) | **PUT** /api/3/scan_engine_pools/{id}/engines/{engineId} | Engine Pool Engines
[**create_scan_engine**](ScanEngineApi.md#create_scan_engine) | **POST** /api/3/scan_engines | Scan Engines
[**create_scan_engine_pool**](ScanEngineApi.md#create_scan_engine_pool) | **POST** /api/3/scan_engine_pools | Engine Pools
[**create_shared_secret**](ScanEngineApi.md#create_shared_secret) | **POST** /api/3/scan_engines/shared_secret | Scan Engine Shared Secret
[**delete_scan_engine**](ScanEngineApi.md#delete_scan_engine) | **DELETE** /api/3/scan_engines/{id} | Scan Engine
[**delete_shared_secret**](ScanEngineApi.md#delete_shared_secret) | **DELETE** /api/3/scan_engines/shared_secret | Scan Engine Shared Secret
[**get_assigned_engine_pools**](ScanEngineApi.md#get_assigned_engine_pools) | **GET** /api/3/scan_engines/{id}/scan_engine_pools | Assigned Engine Pools
[**get_current_shared_secret**](ScanEngineApi.md#get_current_shared_secret) | **GET** /api/3/scan_engines/shared_secret | Scan Engine Shared Secret
[**get_current_shared_secret_time_to_live**](ScanEngineApi.md#get_current_shared_secret_time_to_live) | **GET** /api/3/scan_engines/shared_secret/time_to_live | Scan Engine Shared Secret Time to live
[**get_engine_pool**](ScanEngineApi.md#get_engine_pool) | **GET** /api/3/scan_engine_pools/{id} | Engine Pool
[**get_scan_engine**](ScanEngineApi.md#get_scan_engine) | **GET** /api/3/scan_engines/{id} | Scan Engine
[**get_scan_engine_pool_scan_engines**](ScanEngineApi.md#get_scan_engine_pool_scan_engines) | **GET** /api/3/scan_engine_pools/{id}/engines | Engine Pool Engines
Expand Down Expand Up @@ -170,6 +174,50 @@ No authorization required

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **create_shared_secret**
> str create_shared_secret()
Scan Engine Shared Secret

Returns the current valid shared secret or generates a new shared secret. The endpoint returns an existing shared secret if one was previously generated and it has not yet expired. Conversely, the endpoint will generate and return a new shared secret for either of the following conditions: a shared secret was not previously generated or the previously-generated shared secret has expired. The shared secret is valid for 60 minutes from the moment it is generated.

### Example
```python
from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rapid7vmconsole.ScanEngineApi()

try:
# Scan Engine Shared Secret
api_response = api_instance.create_shared_secret()
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanEngineApi->create_shared_secret: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

### Return type

**str**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json;charset=UTF-8

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **delete_scan_engine**
> Links delete_scan_engine(id)
Expand Down Expand Up @@ -218,6 +266,50 @@ No authorization required

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **delete_shared_secret**
> Links delete_shared_secret()
Scan Engine Shared Secret

Revokes the current valid shared secret, if one exists.

### Example
```python
from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rapid7vmconsole.ScanEngineApi()

try:
# Scan Engine Shared Secret
api_response = api_instance.delete_shared_secret()
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanEngineApi->delete_shared_secret: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**Links**](Links.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json;charset=UTF-8

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_assigned_engine_pools**
> ResourcesEnginePool get_assigned_engine_pools(id)
Expand Down Expand Up @@ -266,6 +358,94 @@ No authorization required

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_current_shared_secret**
> str get_current_shared_secret()
Scan Engine Shared Secret

Returns the current valid shared secret, if one has been previously generated and it has not yet expired; otherwise the endpoint will respond with a 404 status code. Use this endpoint to detect whether a previously-generated shared secret is still valid.

### Example
```python
from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rapid7vmconsole.ScanEngineApi()

try:
# Scan Engine Shared Secret
api_response = api_instance.get_current_shared_secret()
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanEngineApi->get_current_shared_secret: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

### Return type

**str**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json;charset=UTF-8

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_current_shared_secret_time_to_live**
> int get_current_shared_secret_time_to_live()
Scan Engine Shared Secret Time to live

Returns the number of seconds remaining for the current shared secret before it expires, if one has been previously generated and it has not yet expired; otherwise the endpoint will respond with a 404 status code.

### Example
```python
from __future__ import print_function
import time
import rapid7vmconsole
from rapid7vmconsole.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rapid7vmconsole.ScanEngineApi()

try:
# Scan Engine Shared Secret Time to live
api_response = api_instance.get_current_shared_secret_time_to_live()
pprint(api_response)
except ApiException as e:
print("Exception when calling ScanEngineApi->get_current_shared_secret_time_to_live: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

### Return type

**int**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json;charset=UTF-8

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_engine_pool**
> EnginePool get_engine_pool(id)
Expand Down
2 changes: 1 addition & 1 deletion docs/ScanSchedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**links** | [**list[Link]**](Link.md) | | [optional]
**next_runtimes** | **list[str]** | List the next 10 dates in the future the schedule will launch. | [optional]
**on_scan_repeat** | **str** | Specifies the desired behavior of a repeating scheduled scan when the previous scan was paused due to reaching is maximum duration. The following table describes each supported value: | Value | Description | | ---------- | ---------------- | | restart-scan | Stops the previously-paused scan and launches a new scan if the previous scan did not complete within the specified duration. If the previous scheduled scan was not paused, then a new scan is launched. | | resume-scan | Resumes the previously-paused scan if the previous scan did not complete within the specified duration. If the previous scheduled scan was not paused, then a new scan is launched. | |
**repeat** | [**ReportRepeat**](ReportRepeat.md) | Settings for repeating a scheduled task. | [optional]
**repeat** | [**Repeat**](Repeat.md) | Settings for repeating a scheduled scan. | [optional]
**scan_engine_id** | **int** | The identifier of the scan engine to be used for this scan schedule. If not set, the site's assigned scan engine will be used. | [optional]
**scan_name** | **str** | A user-defined name for the scan launched by the schedule. If not explicitly set in the schedule, the scan name will be generated prior to the scan launching. Scan names must be unique within the site's scan schedules. | [optional]
**scan_template_id** | **str** | The identifier of the scan template to be used for this scan schedule. If not set, the site's assigned scan template will be used. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion git_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ "$git_repo_id" = "" ]; then
fi

if [ "$release_note" = "" ]; then
release_note="Update generated library to version: 1.0.0-6.5.43"
release_note="Update generated library to version: 1.0.0-6.5.50"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi

Expand Down
1 change: 1 addition & 0 deletions rapid7vmconsole/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
from rapid7vmconsole.models.references_with_vulnerability_natural_id_link import ReferencesWithVulnerabilityNaturalIDLink
from rapid7vmconsole.models.references_with_web_application_id_link import ReferencesWithWebApplicationIDLink
from rapid7vmconsole.models.remediation_resource import RemediationResource
from rapid7vmconsole.models.repeat import Repeat
from rapid7vmconsole.models.report import Report
from rapid7vmconsole.models.report_config_category_filters import ReportConfigCategoryFilters
from rapid7vmconsole.models.report_config_database_credentials_resource import ReportConfigDatabaseCredentialsResource
Expand Down
6 changes: 5 additions & 1 deletion rapid7vmconsole/api/scan_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ def start_scan(self, id, **kwargs): # noqa: E501
:param async_req bool
:param int id: The identifier of the site. (required)
:param bool override_blackout: ${override.blackout}
:param AdhocScan scan: The details for the scan.
:return: CreatedReferenceScanIDLink
If the method is called asynchronously,
Expand All @@ -495,13 +496,14 @@ def start_scan_with_http_info(self, id, **kwargs): # noqa: E501
:param async_req bool
:param int id: The identifier of the site. (required)
:param bool override_blackout: ${override.blackout}
:param AdhocScan scan: The details for the scan.
:return: CreatedReferenceScanIDLink
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['id', 'scan'] # noqa: E501
all_params = ['id', 'override_blackout', 'scan'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
Expand All @@ -528,6 +530,8 @@ def start_scan_with_http_info(self, id, **kwargs): # noqa: E501
path_params['id'] = params['id'] # noqa: E501

query_params = []
if 'override_blackout' in params:
query_params.append(('overrideBlackout', params['override_blackout'])) # noqa: E501

header_params = {}

Expand Down
Loading

0 comments on commit f8dd9d9

Please sign in to comment.