describeEnvironments method
Returns descriptions for existing environments.
Parameter applicationName
:
If specified, AWS Elastic Beanstalk restricts the returned descriptions to
include only those that are associated with this application.
Parameter environmentIds
:
If specified, AWS Elastic Beanstalk restricts the returned descriptions to
include only those that have the specified IDs.
Parameter environmentNames
:
If specified, AWS Elastic Beanstalk restricts the returned descriptions to
include only those that have the specified names.
Parameter includeDeleted
:
Indicates whether to include deleted environments:
true
: Environments that have been deleted after
IncludedDeletedBackTo
are displayed.
false
: Do not include deleted environments.
Parameter includedDeletedBackTo
:
If specified when IncludeDeleted
is set to true
,
then environments deleted after this date are displayed.
Parameter maxRecords
:
For a paginated request. Specify a maximum number of environments to
include in each response.
If no MaxRecords
is specified, all available environments are
retrieved in a single response.
Parameter nextToken
:
For a paginated request. Specify a token from a previous response page to
retrieve the next response page. All other parameter values must be
identical to the ones specified in the initial request.
If no NextToken
is specified, the first page is retrieved.
Parameter versionLabel
:
If specified, AWS Elastic Beanstalk restricts the returned descriptions to
include only those that are associated with this application version.
Implementation
Future<EnvironmentDescriptionsMessage> describeEnvironments({
String? applicationName,
List<String>? environmentIds,
List<String>? environmentNames,
bool? includeDeleted,
DateTime? includedDeletedBackTo,
int? maxRecords,
String? nextToken,
String? versionLabel,
}) async {
_s.validateStringLength(
'applicationName',
applicationName,
1,
100,
);
_s.validateNumRange(
'maxRecords',
maxRecords,
1,
1000,
);
_s.validateStringLength(
'versionLabel',
versionLabel,
1,
100,
);
final $request = <String, dynamic>{};
applicationName?.also((arg) => $request['ApplicationName'] = arg);
environmentIds?.also((arg) => $request['EnvironmentIds'] = arg);
environmentNames?.also((arg) => $request['EnvironmentNames'] = arg);
includeDeleted?.also((arg) => $request['IncludeDeleted'] = arg);
includedDeletedBackTo?.also(
(arg) => $request['IncludedDeletedBackTo'] = _s.iso8601ToJson(arg));
maxRecords?.also((arg) => $request['MaxRecords'] = arg);
nextToken?.also((arg) => $request['NextToken'] = arg);
versionLabel?.also((arg) => $request['VersionLabel'] = arg);
final $result = await _protocol.send(
$request,
action: 'DescribeEnvironments',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DescribeEnvironmentsMessage'],
shapes: shapes,
resultWrapper: 'DescribeEnvironmentsResult',
);
return EnvironmentDescriptionsMessage.fromXml($result);
}