createSourceNetwork method
Create a new Source Network resource for a provided VPC ID.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw UninitializedAccountException.
May throw ValidationException.
Parameter originAccountID :
Account containing the VPC to protect.
Parameter originRegion :
Region containing the VPC to protect.
Parameter vpcID :
Which VPC ID to protect.
Parameter tags :
A set of tags to be associated with the Source Network resource.
Implementation
Future<CreateSourceNetworkResponse> createSourceNetwork({
required String originAccountID,
required String originRegion,
required String vpcID,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'originAccountID': originAccountID,
'originRegion': originRegion,
'vpcID': vpcID,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/CreateSourceNetwork',
exceptionFnMap: _exceptionFns,
);
return CreateSourceNetworkResponse.fromJson(response);
}