updateResourceConfiguration method

Future<UpdateResourceConfigurationResponse> updateResourceConfiguration({
  1. required String resourceConfigurationIdentifier,
  2. bool? allowAssociationToShareableServiceNetwork,
  3. List<String>? portRanges,
  4. ResourceConfigurationDefinition? resourceConfigurationDefinition,
})

Updates the specified resource configuration.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter resourceConfigurationIdentifier : The ID of the resource configuration.

Parameter allowAssociationToShareableServiceNetwork : Indicates whether to add the resource configuration to service networks that are shared with other accounts.

Parameter portRanges : The TCP port ranges that a consumer can use to access a resource configuration. You can separate port ranges with a comma. Example: 1-65535 or 1,2,22-30

Parameter resourceConfigurationDefinition : Identifies the resource configuration in one of the following ways:

  • Amazon Resource Name (ARN) - Supported resource-types that are provisioned by Amazon Web Services services, such as RDS databases, can be identified by their ARN.
  • Domain name - Any domain name that is publicly resolvable.
  • IP address - For IPv4 and IPv6, only IP addresses in the VPC are supported.

Implementation

Future<UpdateResourceConfigurationResponse> updateResourceConfiguration({
  required String resourceConfigurationIdentifier,
  bool? allowAssociationToShareableServiceNetwork,
  List<String>? portRanges,
  ResourceConfigurationDefinition? resourceConfigurationDefinition,
}) async {
  final $payload = <String, dynamic>{
    if (allowAssociationToShareableServiceNetwork != null)
      'allowAssociationToShareableServiceNetwork':
          allowAssociationToShareableServiceNetwork,
    if (portRanges != null) 'portRanges': portRanges,
    if (resourceConfigurationDefinition != null)
      'resourceConfigurationDefinition': resourceConfigurationDefinition,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/resourceconfigurations/${Uri.encodeComponent(resourceConfigurationIdentifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateResourceConfigurationResponse.fromJson(response);
}