updateConnectionGroup method
Updates a connection group.
May throw AccessDenied.
May throw EntityAlreadyExists.
May throw EntityLimitExceeded.
May throw EntityNotFound.
May throw InvalidArgument.
May throw InvalidIfMatchVersion.
May throw PreconditionFailed.
May throw ResourceInUse.
Parameter id :
The ID of the connection group.
Parameter ifMatch :
The value of the ETag header that you received when
retrieving the connection group that you're updating.
Parameter anycastIpListId :
The ID of the Anycast static IP list.
Parameter enabled :
Whether the connection group is enabled.
Parameter ipv6Enabled :
Enable IPv6 for the connection group. For more information, see Enable
IPv6 in the Amazon CloudFront Developer Guide.
Implementation
Future<UpdateConnectionGroupResult> updateConnectionGroup({
required String id,
required String ifMatch,
String? anycastIpListId,
bool? enabled,
bool? ipv6Enabled,
}) async {
final headers = <String, String>{
'If-Match': ifMatch.toString(),
};
final $result = await _protocol.sendRaw(
method: 'PUT',
requestUri: '/2020-05-31/connection-group/${Uri.encodeComponent(id)}',
headers: headers,
payload: UpdateConnectionGroupRequest(
id: id,
ifMatch: ifMatch,
anycastIpListId: anycastIpListId,
enabled: enabled,
ipv6Enabled: ipv6Enabled)
.toXml('UpdateConnectionGroupRequest'),
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return UpdateConnectionGroupResult(
connectionGroup: ConnectionGroup.fromXml($elem),
eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
);
}