You can update only those connectors that created in the Connector application. Specify the connector ID and you can then update details of the specified connector.
Using the NOT EQUALS operator for updating AWS connectors could result in accidental update of unknown AWS connectors without any warning. To prevent accidental updates of unknown AWS connectors, we do not support NOT EQUALS operator for update actions.
Permissions required - Managers with full scope.
Parameter |
Mandatory /Optional |
Data Type |
Description |
---|---|---|---|
name |
Optional |
integer |
The ID of the connector that you want to update. |
description |
Optional |
text |
Name of the connector you want to update. |
defaultTags |
Optional |
text |
(TagSimpleQList) Tags applied to any asset discovered by the connector. |
activation |
Optional |
text |
(List<ActivationModule>) Assets discovered by the connector is activated for the modules specified. |
allRegions |
Optional |
integer |
(boolean) If true, the end point’s collection is ignored and all the AWS regions scanned. |
disabled |
Optional |
date |
(boolean) Whether execution of the connector is disabled (YES). If disabled, the connector does not synchronize assets. |
arn |
Optional |
date |
Generated by AWS. Ensure that you provide the same ARN that is generated by AWS. |
externalId |
Optional |
boolean |
Random string which is unique for each user. |
runFrequency |
Optional |
boolean |
runFrequency for a connector decides the rate at which the connector should poll the cloud provider and fetch the data. Specified in minutes. |
isRemediationEnabled |
Optional |
keyword |
A flag to enable or disable remediation for the connector. |
connectorAppInfos.set. ConnectorAppInfoQList |
Optional |
date |
A mandatory parent parameter when you need to provide the below parameter, set.ConnectorAppInfo. |
connectorAppInfos |
It holds the list of list of ConnectorAppInfo which includes App Name, identifiers and tag details. Connector can one or more apps from list [AI, CI, CSA]. AI-Asset Inventory, CI- Cloud Inventory, CSA- Cloud Security Assessment |
You can secure publicly exposed cloud assets by enabling cloud perimeter scans for your connectors. Cloud perimeter scans use Qualys External Scanners (Internet Remote Scanners), located at the Qualys Cloud Platform.
You can automate asset discovery of Connectors and with the Cloud Perimeter Scan. This ensures all publicly-exposed assets have perimeter scans performed, based on configurations provided at Connector.
Parameter |
Mandatory /Optional |
Data Type |
Description |
---|---|---|---|
isCPSEnabled |
Optional |
integer |
(optional) Set this flag to enable or disable cloud perimeter scan for the AWS connector (Note: If isCPSEnabled flag is enabled, you need to provide the following parameters for the Cloud Perimeter Scan). |
connectorScanSetting |
Tag to include cloud perimeter scan settings. |
||
isCustomScanConfig Enabled |
Use this flag to indicate the scan configuration to be used for cloud perimeters scan. By default, this flag is disabled and the global scan configuration is applied to the cloud perimeter scan. To use custom scan configuration, you need to enable this flag. |
||
optionProfileId |
Specify the Option Profile Id. This Id is unique for every user. You can fetch the option profile Id using the List VM Option Profile API (/api/2.0/fo/subscription/option_profile/vm/?action=list). For more information on the how to fetch the option profile Id, refer to Qualys API (VM, PC) User Guide. |
||
recurrence |
Specify if the scan should be scheduled on DAILY or WEEKLY basis. |
||
daysOfWeek |
Specify the days when the scan should be scheduled. For example, SUN, MON, TUE, WED, THU, FRI, SAT. Note: This field is applicable only if the recurrence field is set to WEEKLY. |
||
scanPrefix |
Specify a prefix to be appended to the scan name. Once the cloud perimeter scan is triggered from the Vulnerability Management application, the prefix is appended to the scan name. The scan name is in following format: <prefix>-<connectorId>-<timestamp> |
||
startDate |
Specify the start date of scan in mm/dd/yyyy format. |
||
startTime |
Specify the start time of scan in HH:MM (24 hrs) format. |
||
timezone |
Specify the time zone for the cloud perimeter scan to be initiated. |
Change the name of an asset data connector with ID of 12345, add a tag with the ID of 1 to the defaultTags collection, and add us-east-1 as scanned region
API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --data-binary @- "<qualys_base_url>/qps/rest/3.0/update/am/awsassetdataconnector/XXXXX"
Request POST data
<ServiceRequest>
<data>
<AwsAssetDataConnector>
<name>AWSConnector API Updated</name>
<description>Updated Description Via API Updated</description>
<defaultTags>
<set>
<TagSimple>
<id>42458382</id>
</TagSimple>
</set>
</defaultTags>
<activation>
<set>
<ActivationModule>VM</ActivationModule>
</set>
</activation>
<allRegions>true</allRegions>
<disabled>false</disabled>
<runFrequency>120</runFrequency>
<isRemediationEnabled>false</isRemediationEnabled>
<arn>arn:aws:iam:::12345678911/role:testrole</arn>
<externalId>POD-999999-11213331</externalId>
<connectorAppInfos>
<set>
<ConnectorAppInfoQList>
<set>
<ConnectorAppInfo>
<name>AI</name>
<identifier>arn:aws:iam:::12345678911/role:testrole</identifier>
<tagId>42458382</tagId>
</ConnectorAppInfo>
</set>
<set>
<ConnectorAppInfo>
<name>CI</name>
<identifier>arn:aws:iam:::12345678911/role:testrole</identifier>
<tagId>42458382</tagId>
</ConnectorAppInfo>
</set>
<set>
<ConnectorAppInfo>
<name>CSA</name>
<identifier>arn:aws:iam:::12345678911/role:testrole</identifier>
<tagId>42458382</tagId>
</ConnectorAppInfo>
</set>
</ConnectorAppInfoQList>
</set>
</connectorAppInfos>
</AwsAssetDataConnector>
</data>
</ServiceRequest>
Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/3.0/am/awsassetdataconnector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<AwsAssetDataConnector>
<id>843003</id>
</AwsAssetDataConnector>
</data>
</ServiceResponse>
API Request (JSON)
curl -u "USERNAME:PASSWORD" -X "POST" --data-binary @- "<qualys_base_url>/qps/rest/3.0/update/am/awsassetdataconnector/XXXXX" --header 'Accept: application/json'
Request POST Data (JSON)
{
"ServiceRequest": {
"data": {
"AwsAssetDataConnector": {
"name": "AWSConnector API ",
"description": "Updated Description Via API ",
"defaultTags": {
"set": {
"TagSimple": {
"id": 42458382
}
}
},
"activation": {
"set": {
"ActivationModule": [
"SCA","PC"
]
}
},
"allRegions": false,
"disabled": false,
"runFrequency": 600,
"isRemediationEnabled": true,
"connectorAppInfos": {
"set": {
"ConnectorAppInfoQList": [
{
"set": {
"ConnectorAppInfo": {
"name": "AI",
"identifier": "arn:aws:iam:::12345678911/role:testrole",
"tagId": 42458382
}
}
},
{
"set": {
"ConnectorAppInfo": {
"name": "CI",
"identifier": "arn:aws:iam:::12345678911/role:testrole",
"tagId": 42458382
}
}
},
{
"set": {
"ConnectorAppInfo": {
"name": "CSA",
"identifier": "arn:aws:iam:::12345678911/role:testrole",
"tagId": 42458382
}
}
}
]
}
}
}
}
}
}
Response (JSON)
{
"ServiceResponse": {
"responseCode": "SUCCESS",
"count": 1,
"data": [
{
"AwsAssetDataConnector": {
"id": xxxxx
}
}
]
}
}
API request
curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --data-binary @- "<qualys_base_url>/qps/rest/3.0/update/am/awsassetdataconnector/"< file.xml
Request POST data
<ServiceRequest>
<data>
...
<isCPSEnabled>true</isCPSEnabled>
<connectorScanSetting>
<isCustomScanConfigEnabled>true</isCustomScanConfigEnabled>
</connectorScanSetting>
<connectorScanConfig>
<set>
<ConnectorScanConfiguration>
<daysOfWeek>
<set>
<Day>SUN</Day>
<Day>MON</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<scanPrefix>update scan prefix</scanPrefix>
<startDate>31/05/2022</startDate>
<startTime>15:45</startTime>
<timezone>Africa/Cairo</timezone>
</ConnectorScanConfiguration>
</set>
</connectorScanConfig>
...
</data>
</ServiceRequest>
Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/3.0/am/awsassetdataconnector.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
...
<isCPSEnabled>true</isCPSEnabled>
<connectorScanSetting>
<isCustomScanConfigEnabled>true</isCustomScanConfigEnabled>
</connectorScanSetting>
<connectorScanConfig>
<set>
<ConnectorScanConfiguration>
<daysOfWeek>
<set>
<Day>SUN</Day>
<Day>MON</Day>
<Day>TUE</Day>
</set>
</daysOfWeek>
<optionProfileId>2</optionProfileId>
<recurrence>WEEKLY</recurrence>
<scanPrefix>updated- AWS scan prefix</scanPrefix>
<startDate>31/05/2022</startDate>
<startTime>15:45</startTime>
<timezone>Africa/Cairo</timezone>
</ConnectorScanConfiguration>
</set>
</connectorScanConfig>
...
</data>
</ServiceResponse>