describeElasticLoadBalancers method

Future<DescribeElasticLoadBalancersResult> describeElasticLoadBalancers({
  1. List<String>? layerIds,
  2. String? stackId,
})

Describes a stack's Elastic Load Balancing instances. Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.

May throw ValidationException. May throw ResourceNotFoundException.

Parameter layerIds : A list of layer IDs. The action describes the Elastic Load Balancing instances for the specified layers.

Parameter stackId : A stack ID. The action describes the stack's Elastic Load Balancing instances.

Implementation

Future<DescribeElasticLoadBalancersResult> describeElasticLoadBalancers({
  List<String>? layerIds,
  String? stackId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OpsWorks_20130218.DescribeElasticLoadBalancers'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (layerIds != null) 'LayerIds': layerIds,
      if (stackId != null) 'StackId': stackId,
    },
  );

  return DescribeElasticLoadBalancersResult.fromJson(jsonResponse.body);
}