create_connector
¶
create_connector(
*,
config_overrides: Optional[SecurityHubClientConfig] = None,
name: Optional[NonEmptyString] = None,
description: Optional[NonEmptyString] = None,
provider: Optional[CspmProviderConfiguration] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateConnectorResponse
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.
Parameters:
-
name(Optional[NonEmptyString], default:None) –The name of the connector. Must be unique within the account.
-
description(Optional[NonEmptyString], default:None) –The description of the connector.
-
provider(Optional[CspmProviderConfiguration], default:None) –The configuration for the cloud provider to connect to. Currently supports Azure.
-
tags(Optional[TagMap], default:None) –The tags to add to the connector resource.
-
client_token(Optional[ClientToken], default:None) –A unique identifier used to ensure idempotency of the request.
Raises:
-
AccessDeniedException–You don't have permission to perform the action specified in the request.
-
ConflictException–The request causes conflict with the current state of the service resource.
-
InternalServerException–The request has failed due to an internal failure of the service.
-
InvalidAccessException–The account doesn't have permission to perform this action.
-
ResourceNotFoundException–The request was rejected because we can't find the specified resource.
-
ServiceQuotaExceededException–The request was rejected because it would exceed the service quota limit.
-
ThrottlingException–The limit on the number of requests per second was exceeded.
-
ValidationException–The request has failed validation because it's missing required fields or has invalid inputs.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a CSPM connector This operation creates a CSPM connector to connect Security Hub to an Azure environment.
>>> client.create_connector(name='MyAzureConnector', description='Connector for Azure tenant monitoring', provider={'Azure': {'AWSConfigConnectorArn': 'arn:aws:config:us-east-1:123456789012:connector/azure-connector-1234', 'ScopeConfiguration': {'ScopeType': 'TENANT'}, 'AzureRegions': ['eastus', 'westus2']}})
Source code in docs_src/capo_securityhub/_services/security_hub.py
1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 | |