connectors
Creates, updates, deletes, gets or lists a connectors resource.
Overview
| Name | connectors |
| Type | Resource |
| Id | aws.securityhub.connectors |
Fields
The following fields are returned by SELECT queries:
- get_connector
- list_connectors
| Name | Datatype | Description |
|---|---|---|
connector_arn | string | The Amazon Resource Name (ARN) of the connector. (pattern: <code>.\S.</code>) |
connector_id | string | The unique identifier of the connector. (pattern: <code>.\S.</code>) |
created_at | string (date-time) | The ISO 8601 UTC timestamp indicating when the connector was created. |
created_by | string | The service principal that created the connector. (pattern: <code>.\S.</code>) |
description | string | The description of the connector. (pattern: <code>.\S.</code>) |
enablement_status | string | The enablement status of a CSPM connector. Indicates the lifecycle state of the connector resource. (ENABLED, PENDING_ENABLEMENT, PENDING_UPDATE, PENDING_DELETION) |
health | object | The health status of the connector, including connectivity status and last check time. |
last_updated_at | string (date-time) | The ISO 8601 UTC timestamp indicating when the connector was last updated. |
name | string | The name of the connector. (pattern: <code>.\S.</code>) |
provider_detail | object | The cloud provider configuration details for the connector. |
| Name | Datatype | Description |
|---|---|---|
connectors | array | An array of connector summaries. |
next_token | string | The pagination token to use to request the next page of results. If there are no additional results, this value is null. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_connector | select | connector_id, region | Retrieves details for a CSPM connector based on the connector ID. | |
list_connectors | select | region | NextToken, MaxResults, ProviderName, ConnectorStatus, EnablementStatus | Lists the CSPM connectors and their metadata for the calling account. |
create_connector | insert | region, Provider | Creates a connector to a third-party cloud provider in Security Hub CSPM. A connector establishes a connection between Security Hub CSPM and a third-party cloud provider, enabling Security Hub CSPM to ingest security findings and resource data from the connected environment. | |
update_connector | update | connector_id, region | Updates a CSPM connector's configuration, such as the scope or regions for the connected cloud provider. | |
delete_connector | delete | connector_id, region | Deletes a CSPM connector. When you delete a connector, Security Hub CSPM stops ingesting findings and resource data from the connected cloud provider environment. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
connector_id | string | The unique identifier of the connector to delete. |
region | string | AWS region (default: us-east-1) |
ConnectorStatus | string | The connectivity status to filter connectors by. |
EnablementStatus | string | The enablement status to filter connectors by. |
MaxResults | integer | The maximum number of results to return. |
NextToken | string | The pagination token to request the next page of results. |
ProviderName | string | The name of the cloud provider to filter connectors by. |
SELECT examples
- get_connector
- list_connectors
Retrieves details for a CSPM connector based on the connector ID.
SELECT
connector_arn,
connector_id,
created_at,
created_by,
description,
enablement_status,
health,
last_updated_at,
name,
provider_detail
FROM aws.securityhub.connectors
WHERE connector_id = '{{ connector_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the CSPM connectors and their metadata for the calling account.
SELECT
connectors,
next_token
FROM aws.securityhub.connectors
WHERE region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND ProviderName = '{{ ProviderName }}'
AND ConnectorStatus = '{{ ConnectorStatus }}'
AND EnablementStatus = '{{ EnablementStatus }}'
;
INSERT examples
- create_connector
- Manifest
Creates a connector to a third-party cloud provider in Security Hub CSPM. A connector establishes a connection between Security Hub CSPM and a third-party cloud provider, enabling Security Hub CSPM to ingest security findings and resource data from the connected environment.
INSERT INTO aws.securityhub.connectors (
Name,
Description,
Provider,
Tags,
ClientToken,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ Provider }}' /* required */,
'{{ Tags }}',
'{{ ClientToken }}',
'{{ region }}'
RETURNING
connector_arn,
connector_id,
connector_status,
enablement_status
;
# Description fields are for documentation purposes
- name: connectors
props:
- name: region
value: "{{ region }}"
description: Required parameter for the connectors resource.
- name: Name
value: "{{ Name }}"
- name: Description
value: "{{ Description }}"
- name: Provider
description: |
The cloud provider configuration for creating a connector. This is a union type that currently supports Azure.
value:
Azure:
AWSConfigConnectorArn: "{{ AWSConfigConnectorArn }}"
ScopeConfiguration:
ScopeType: "{{ ScopeType }}"
ScopeValues:
- "{{ ScopeValues }}"
AzureRegions:
- "{{ AzureRegions }}"
- name: Tags
value: "{{ Tags }}"
- name: ClientToken
value: "{{ ClientToken }}"
UPDATE examples
- update_connector
Updates a CSPM connector's configuration, such as the scope or regions for the connected cloud provider.
UPDATE aws.securityhub.connectors
SET
Description = '{{ Description }}',
Provider = '{{ Provider }}'
WHERE
connector_id = '{{ connector_id }}' --required
AND region = '{{ region }}' --required
RETURNING
connector_status,
enablement_status;
DELETE examples
- delete_connector
Deletes a CSPM connector. When you delete a connector, Security Hub CSPM stops ingesting findings and resource data from the connected cloud provider environment.
DELETE FROM aws.securityhub.connectors
WHERE connector_id = '{{ connector_id }}' --required
AND region = '{{ region }}' --required
;