createControlPanel method

Future<CreateControlPanelResponse> createControlPanel({
  1. required String clusterArn,
  2. required String controlPanelName,
  3. String? clientToken,
  4. Map<String, String>? tags,
})

Creates a new control panel. A control panel represents a group of routing controls that can be changed together in a single transaction. You can use a control panel to centrally view the operational status of applications across your organization, and trigger multi-app failovers in a single transaction, for example, to fail over an Availability Zone or Amazon Web Services Region.

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

Parameter clusterArn : The Amazon Resource Name (ARN) of the cluster for the control panel.

Parameter controlPanelName : The name of the control panel.

Parameter clientToken : A unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request with an action, specify a client token in the request.

Parameter tags : The tags associated with the control panel.

Implementation

Future<CreateControlPanelResponse> createControlPanel({
  required String clusterArn,
  required String controlPanelName,
  String? clientToken,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'ClusterArn': clusterArn,
    'ControlPanelName': controlPanelName,
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/controlpanel',
    exceptionFnMap: _exceptionFns,
  );
  return CreateControlPanelResponse.fromJson(response);
}