createNetworkSettings method
Creates a network settings resource that can be associated with a web portal. Once associated with a web portal, network settings define how streaming instances will connect with your specified VPC.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter securityGroupIds :
One or more security groups used to control access from streaming
instances to your VPC.
Parameter subnetIds :
The subnets in which network interfaces are created to connect streaming
instances to your VPC. At least two of these subnets must be in different
availability zones.
Parameter vpcId :
The VPC that streaming instances will connect to.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. Idempotency ensures that an API request
completes only once. With an idempotent request, if the original request
completes successfully, subsequent retries with the same client token
returns the result from the original successful request.
If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.
Parameter tags :
The tags to add to the network settings resource. A tag is a key-value
pair.
Implementation
Future<CreateNetworkSettingsResponse> createNetworkSettings({
required List<String> securityGroupIds,
required List<String> subnetIds,
required String vpcId,
String? clientToken,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'securityGroupIds': securityGroupIds,
'subnetIds': subnetIds,
'vpcId': vpcId,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/networkSettings',
exceptionFnMap: _exceptionFns,
);
return CreateNetworkSettingsResponse.fromJson(response);
}