getDeployment method
Gets information about a Deployment resource.
May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException. May throw ServiceUnavailableException.
Parameter deploymentId
:
Required
The identifier of the Deployment resource to get
information about.
Parameter restApiId
:
Required
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 {
ArgumentError.checkNotNull(deploymentId, 'deploymentId');
ArgumentError.checkNotNull(restApiId, 'restApiId');
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);
}