getBranch method
Returns a branch for an Amplify app.
May throw BadRequestException. May throw UnauthorizedException. May throw NotFoundException. May throw InternalFailureException.
Parameter appId
:
The unique ID for an Amplify app.
Parameter branchName
:
The name for the branch.
Implementation
Future<GetBranchResult> getBranch({
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: 'GET',
requestUri:
'/apps/${Uri.encodeComponent(appId)}/branches/${Uri.encodeComponent(branchName)}',
exceptionFnMap: _exceptionFns,
);
return GetBranchResult.fromJson(response);
}