Skip to main content

generateAmazonEC2ExternalIdForCrossAccountRole

This method generates an External ID. External IDs are required to configure AWS Cross-Account Roles, which you will need for Amazon EC2 integrations.

Once an integration has been performed, the External ID used is invalidated and permanently associated to that specific integration. To perform other integrations you will need to generate another External ID.

If the previous External ID has not been used, generating a new one will overwrite and invalidate it.

Tip

You can use the getAmazonEC2ExternalIdForCrossAccountRole method to retrieve the most recent External ID.

Parameters

Parameter

Type

Optional

Description

companyId

String

Yes

The ID of the target company. The default value is the ID of the company linked to the user who generated the API key.

Return value

This method returns an String containing the generated External ID.

Attribute

Type

Details

result

String

The generated External ID.

Example

Request:

  {
       "params": {
           "companyId": "55115935b1a43dcc4a7b23c6"
       },
       "jsonrpc": "2.0",
       "method": "generateAmazonEC2ExternalIdForCrossAccountRole",
       "id": "5c6df60c-786a-4ea3-8ff3-b6e52b42aa46"
  }  

Response:

  {
      "id": "5c6df60c-786a-4ea3-8ff3-b6e52b42aa46",
      "jsonrpc": "2.0",
      "result": "5e93f474a30a2db85dd6046d6d5fg188"
  }