deleteBackendEnvironment method
Deletes a backend environment for an Amplify app.
May throw BadRequestException. May throw UnauthorizedException. May throw NotFoundException. May throw InternalFailureException. May throw DependentServiceFailureException.
Parameter appId
:
The unique ID of an Amplify app.
Parameter environmentName
:
The name of a backend environment of an Amplify app.
Implementation
Future<DeleteBackendEnvironmentResult> deleteBackendEnvironment({
required String appId,
required String environmentName,
}) async {
ArgumentError.checkNotNull(appId, 'appId');
_s.validateStringLength(
'appId',
appId,
1,
20,
isRequired: true,
);
ArgumentError.checkNotNull(environmentName, 'environmentName');
_s.validateStringLength(
'environmentName',
environmentName,
1,
255,
isRequired: true,
);
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/apps/${Uri.encodeComponent(appId)}/backendenvironments/${Uri.encodeComponent(environmentName)}',
exceptionFnMap: _exceptionFns,
);
return DeleteBackendEnvironmentResult.fromJson(response);
}