create_connector
¶
create_connector(
name: ConnectorName,
provider: ConnectorCloudProvider,
provider_detail: ProviderDetailCreate,
*,
config_overrides: Optional[Inspector2ClientConfig] = None,
client_token: Optional[str] = None,
description: Optional[ConnectorDescription] = None,
tags: Optional[ConnectorTagMap] = None,
) -> CreateConnectorResponse
Creates a connector that links an external cloud provider to Amazon Inspector for vulnerability scanning.
Parameters:
-
client_token(Optional[str], default:None) –A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.
-
name(ConnectorName) –The name of the connector.
-
provider(ConnectorCloudProvider) –The cloud provider for the connector.
-
description(Optional[ConnectorDescription], default:None) –A description of the connector.
-
provider_detail(ProviderDetailCreate) –The provider-specific configuration details for the connector.
-
tags(Optional[ConnectorTagMap], default:None) –The tags to apply to the connector.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
For
Enable, you receive this error if you attempt to use a feature in an unsupported Amazon Web Services Region. -
ConflictException–A conflict occurred. This exception occurs when the same resource is being modified by concurrent requests.
-
InternalServerException–The request has failed due to an internal failure of the Amazon Inspector service.
-
ServiceQuotaExceededException–You have exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use Service Quotas to request a service quota increase.
-
ThrottlingException–The limit on the number of requests per second was exceeded.
-
ValidationException–The request has failed validation due to missing required fields or having invalid inputs.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create an Azure customer-managed connector for VM scanning at SUBSCRIPTION scope
>>> client.create_connector(name='my-azure-connector', description='Azure subscription scanner', provider='AZURE', provider_detail={'azure': {'awsConfigConnectorArn': 'arn:aws:config:us-east-1:123456789012:connector/azure/a7bc5463-04ce-4b52-901e-f26f7292a4a7/2fbed4bd-5b95-4947-a751-8defc76ecdae', 'scopeConfiguration': {'vmScanning': {'scopeType': 'SUBSCRIPTION', 'scopeValues': ['552802f5-1492-4184-bbae-7291c9939b16']}}, 'azureRegions': ['eastus'], 'autoInstallVMScanner': True}}, tags={'env': 'prod', 'owner': 'security-team'})
Source code in docs_src/capo_inspector2/_services/inspector2.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 | |