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