createConnector method
Creates a connector that links an external cloud provider to Amazon Inspector for vulnerability scanning.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
The name of the connector.
Parameter provider :
The cloud provider for the connector.
Parameter providerDetail :
The provider-specific configuration details for the connector.
Parameter clientToken :
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.
Parameter description :
A description of the connector.
Parameter tags :
The tags to apply to the connector.
Implementation
Future<CreateConnectorResponse> createConnector({
required String name,
required ConnectorCloudProvider provider,
required ProviderDetailCreate providerDetail,
String? clientToken,
String? description,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'name': name,
'provider': provider.value,
'providerDetail': providerDetail,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/connector/create',
exceptionFnMap: _exceptionFns,
);
return CreateConnectorResponse.fromJson(response);
}