requestEnvironmentInfo method
- required EnvironmentInfoType infoType,
- String? environmentId,
- String? environmentName,
Initiates a request to compile the specified type of information of the deployed environment.
Setting the InfoType
to tail
compiles the last
lines from the application server log files of every Amazon EC2 instance
in your environment.
Setting the InfoType
to bundle
compresses the
application server log files for every Amazon EC2 instance into a
.zip
file. Legacy and .NET containers do not support bundle
logs.
Use RetrieveEnvironmentInfo to obtain the set of logs.
Related Topics
Parameter infoType
:
The type of information to request.
Parameter environmentId
:
The ID of the environment of the requested data.
If no such environment is found, RequestEnvironmentInfo
returns an InvalidParameterValue
error.
Condition: You must specify either this or an EnvironmentName, or both. If
you do not specify either, AWS Elastic Beanstalk returns
MissingRequiredParameter
error.
Parameter environmentName
:
The name of the environment of the requested data.
If no such environment is found, RequestEnvironmentInfo
returns an InvalidParameterValue
error.
Condition: You must specify either this or an EnvironmentId, or both. If
you do not specify either, AWS Elastic Beanstalk returns
MissingRequiredParameter
error.
Implementation
Future<void> requestEnvironmentInfo({
required EnvironmentInfoType infoType,
String? environmentId,
String? environmentName,
}) async {
ArgumentError.checkNotNull(infoType, 'infoType');
_s.validateStringLength(
'environmentName',
environmentName,
4,
40,
);
final $request = <String, dynamic>{};
$request['InfoType'] = infoType.toValue();
environmentId?.also((arg) => $request['EnvironmentId'] = arg);
environmentName?.also((arg) => $request['EnvironmentName'] = arg);
await _protocol.send(
$request,
action: 'RequestEnvironmentInfo',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['RequestEnvironmentInfoMessage'],
shapes: shapes,
);
}