Update AWS Connector

[POST] /qps/rest/2.0/update/am/awsassetdataconnector

[POST] /qps/rest/2.0/update/am/awsassetdataconnector/<id>

Updates writable fields and collections.

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.

Sample 1 - Update AWS connector nameSample 1 - Update AWS connector name

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/2.0/update/am/awsassetdataconnector/12345" < file.xml
Note: file.xml contains request POST data      
    

Request POST data

<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
    <data>
        <AwsAssetDataConnector>
            <name>Updated Name</name>
            <defaultTags>
                <add>
                    <TagSimple>
                        <id>1</id>
                    </TagSimple>
                </add>
            </defaultTags>
            <endpoints>
                <add>
                    <AwsEndpointSimple>
                        <regionCode>us-east-1</regionCode>
                    </AwsEndpointSimple>
                    <AwsEndpointSimple>
                        <regionCode>me-south-1</regionCode>
                    </AwsEndpointSimple>
                    <add>
                        <endpoints>
                        </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/2.0/am/aws_asset_data_connector.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <hasMoreRecords>false</hasMoreRecords>
    <data>
        <AssetDataConnector>
            <id>12345</id>
            <name>External VPC</name>
            <lastSync>2014-11-26T08:44:05Z</lastSync>
            <lastError />
            <connectorState>SUCCESS</connectorState>
            <type>AWS</type>
            <defaultTags>
                <list>
                    <TagSimple>
                        <id>1</id>
                        <name>EC2</name>
                    </TagSimple>
                </list>
            </defaultTags>
            <activation>
                <ActivationModule>VM</ActivationModule>
            </activation>
            <disabled>false</disabled>
            <isGovCloudConfigured>false</isGovCloudConfigured>
        </AssetDataConnector>
    </data>
</ServiceResponse>      
    

Sample 2 - Update existing key-based connector to cross-account roleSample 2 - Update existing key-based connector to cross-account role

Here’s how to update an existing connector to use a cross-access account role. You’ll need the ARN generated from your AWS account. Note that this migration of your existing EC2 connector to cross account role is unidirectional and cannot be reverted.

API request

curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST"
--data-binary @- "<qualys_base_url>/qps/rest/2.0/update/am/awsassetdataconnector/12345" < file.xml
Note: file.xml contains request POST data      
    

Request POST data

<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
    <data>
        <AwsAssetDataConnector>
            <arn>arn:aws:iam::205767712438:role/qualys_dev_test</arn>
            <externalId>pod13-xxxxxx-xxxxx</externalId>
        </AwsAssetDataConnector>
    </data>
</ServiceRequest>      
    

Response

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://qualysapi.qualys.com/qps/xsd/2.0/am/aws_asset_data_connector.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <AwsAssetDataConnector>
            <id>19201</id>
        </AwsAssetDataConnector>
    </data>
</ServiceResponse>      
    

Sample 3 - Update existing AWS asset data connector to make it available in the CloudView AppSample 3 - Update existing AWS asset data connector to make it available in the CloudView App

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/2.0/update/am/awsassetdataconnector/266203" < file.xml
Note: file.xml contains request POST data      
    

Request POST data

<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
    <data>
        <AwsAssetDataConnector>
            <useForCloudView>true</useForCloudView>
        </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/2.0/am/aws_asset_data_connector.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <AwsAssetDataConnector>
            <id>266203</id>
        </AwsAssetDataConnector>
    </data>
</ServiceResponse>      
    

Sample 4 - Update existing AWS asset data connector to include CertView moduleSample 4 - Update existing AWS asset data connector to include CertView module

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/2.0/update/am/awsassetdataconnector/80201"
< file.xml
Note: file.xml contains request POST data      
    

Request POST data

<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
    <data>
        <AwsAssetDataConnector>
            <name>new connector-edit</name>
            <activation>
                <add>
                    <ActivationModule>CERTVIEW</ActivationModule>
                </add>
            </activation>
        </AwsAssetDataConnector>
    </data>
</ServiceRequest>      
    

Response

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://v-qps1.dev.qualys.com:8080/portal-api/xsd/2.0/am/aws_asset_data_connector.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <AwsAssetDataConnector>
            <id>80201</id>
        </AwsAssetDataConnector>
    </data>
</ServiceResponse>      
    

XSD

<platform API server>/qps/xsd/2.0/am/aws_asset_data_connector.xsd