updateNetwork method

Future<UpdateNetworkResponse> updateNetwork({
  1. required String networkId,
  2. List<IpPoolUpdateRequest>? ipPools,
  3. String? name,
  4. List<RouteUpdateRequest>? routes,
})

Change the settings for a Network.

May throw BadGatewayException. May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw GatewayTimeoutException. May throw InternalServerErrorException. May throw TooManyRequestsException.

Parameter networkId : The ID of the network

Parameter ipPools : Include this parameter only if you want to change the pool of IP addresses in the network. An array of IpPoolCreateRequests that identify a collection of IP addresses in this network that you want to reserve for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPoolUpdateRequest specifies one CIDR block.

Parameter name : Include this parameter only if you want to change the name of the Network. Specify a name that is unique in the AWS account. Names are case-sensitive.

Parameter routes : Include this parameter only if you want to change or add routes in the Network. An array of Routes that MediaLive Anywhere needs to know about in order to route encoding traffic.

Implementation

Future<UpdateNetworkResponse> updateNetwork({
  required String networkId,
  List<IpPoolUpdateRequest>? ipPools,
  String? name,
  List<RouteUpdateRequest>? routes,
}) async {
  final $payload = <String, dynamic>{
    if (ipPools != null) 'ipPools': ipPools,
    if (name != null) 'name': name,
    if (routes != null) 'routes': routes,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/prod/networks/${Uri.encodeComponent(networkId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateNetworkResponse.fromJson(response);
}