updateNetworkSettings method
Updates network settings.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter networkSettingsArn :
The ARN of the network settings.
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
return 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 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.
Implementation
Future<UpdateNetworkSettingsResponse> updateNetworkSettings({
required String networkSettingsArn,
String? clientToken,
List<String>? securityGroupIds,
List<String>? subnetIds,
String? vpcId,
}) async {
final $payload = <String, dynamic>{
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (securityGroupIds != null) 'securityGroupIds': securityGroupIds,
if (subnetIds != null) 'subnetIds': subnetIds,
if (vpcId != null) 'vpcId': vpcId,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/networkSettings/${networkSettingsArn.split('/').map(Uri.encodeComponent).join('/')}',
exceptionFnMap: _exceptionFns,
);
return UpdateNetworkSettingsResponse.fromJson(response);
}