Update GCP Connector 3.0

POST /qps/rest/3.0/update/am/gcpassetdataconnector

POST /qps/rest/3.0/update/am/gcpassetdataconnector/<id>

Specify the connector ID and the details to be updated to update details of the specified connector.



Permissions required - Managers with full scope.

Input ParametersInput Parameters

Parameter

Mandatory

/Optional

Data Type

Description

name

 Optional  String

The ID of the connector that you want to update.

description

 Optional  String

Name of the connector you want to update.

authRecord

 Optional String

The GCP authentication record the connector uses to connect to GCP. When writing/updating it is looked up by the ID field.

disabled

 Optional Boolean

Whether execution of the connector is disabled (YES). If disabled the connector does not synchronize assets.

runFrequency

 Optional Integer

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 Boolean

A flag to enable or disable remediation for the connector.

connectorAppInfos

 Optional  List

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

Sample: Update GCP connector nameSample: Update GCP connector name

API request

curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --
data-binary @-
"<qualys_base_url>/qps/rest/3.0/update/am/gcpassetdatacon
nector/178202"      
    

Request POST data

<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
    <data>
        <GcpAssetDataConnector>
            <name>Test GCP connector API UPDATED</name>
            <description>Updated Description By API UPDATED</description>
            <disabled>false</disabled>
            <runFrequency>500</runFrequency>
            <isRemediationEnabled>false</isRemediationEnabled>
            <authRecord>
                <projectId>my-project-xxxxxxxxxx</projectId>
            </authRecord>
            <connectorAppInfos>
                <set>
                    <ConnectorAppInfoQList>
                        <set>
                            <ConnectorAppInfo>
                                <name>CI</name>
                                <identifier>my-project-xxxxxxxxx</identifier>
                                <tagId>121212</tagId>
                            </ConnectorAppInfo>
                        </set>
                    </ConnectorAppInfoQList>
                    <ConnectorAppInfoQList>
                        <set>
                            <ConnectorAppInfo>
                                <name>CSA</name>
                                <identifier>my-project-xxxxxxxxx</identifier>
                                <tagId>121212</tagId>
                            </ConnectorAppInfo>
                        </set>
                    </ConnectorAppInfoQList>
                </set>
            </connectorAppInfos>
        </GcpAssetDataConnector>
    </data>
</ServiceRequest>      
    

Response

<?xml version="1.0" encoding="UTF-8" ?>
<ServiceResponse>
    <data>
        <GcpAssetDataConnector>
            <id>842873</id>
        </GcpAssetDataConnector>
    </data>
    <count>1</count>
    <responseCode>SUCCESS</responseCode>
</ServiceResponse>      
    

API Request (JSON)

"curl -u""USERNAME:PASSWORD""-H""Content-type: text/xml""-X""POST""--
data-binary @-""<qualys_base_url>/qps/rest/3.0/update/am/gcpassetdataconnector/178202""--header""Accept: application/json""--header""Content-Type: application/json"      
    

curl -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --

data-binary @-"<qualys_base_url>/qps/rest/3.0/update/am/gcpassetdataconnector/178202"

--header 'Accept: application/json'

--header 'Content-Type: application/json'

Request POST Data (JSON)

{
   "ServiceRequest":{
      "data":{
         "GcpAssetDataConnector":{
            "name":"Test GCP connector API UPDATED",
            "description":"Updated Description By API UPDATED",
            "disabled":false,
            "runFrequency":500,
            "isRemediationEnabled":false,
            "authRecord":{
               "projectId":"my-project-xxxxxxxxx"
            },
            "connectorAppInfos":{
               "set":{
                  "ConnectorAppInfoQList":[
                     {
                        "set":{
                           "ConnectorAppInfo":{
                              "name":"CI",
                              "identifier":"my-project-xxxxxxxxx",
                              "tagId":121212
                           }
                        }
                     },
                     {
                        "set":{
                           "ConnectorAppInfo":{
                              "name":"CSA",
                              "identifier":"my-project-xxxxxxxxx",
                              "tagId":121212
                           }
                        }
                     }
                  ]
               }
            }
         }
      }
   }
}      
    

Response (JSON)

{
   "ServiceResponse":{
      "data":[
         {
            "GcpAssetDataConnector":{
               "id":842873
            }
         }
      ],
      "count":1,
      "responseCode":"SUCCESS"
   }
}