getDeployment method
Gets information about a Deployment resource.
May throw BadRequestException.
May throw NotFoundException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter deploymentId :
The identifier of the Deployment resource to get information about.
Parameter restApiId :
The string identifier of the associated RestApi.
Parameter embed :
A query parameter to retrieve the specified embedded resources of the
returned Deployment resource in the response. In a REST API call, this
embed parameter value is a list of comma-separated strings,
as in GET
/restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2.
The SDK and other platform-dependent libraries might use a different
format for the list. Currently, this request supports only retrieval of
the embedded API summary this way. Hence, the parameter value must be a
single-valued list containing only the "apisummary" string.
For example, GET
/restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary.
Implementation
Future<Deployment> getDeployment({
required String deploymentId,
required String restApiId,
List<String>? embed,
}) async {
final $query = <String, List<String>>{
if (embed != null) 'embed': embed,
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/restapis/${Uri.encodeComponent(restApiId)}/deployments/${Uri.encodeComponent(deploymentId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return Deployment.fromJson(response);
}