updateDeployment method
Updates a Deployment.
May throw NotFoundException. May throw TooManyRequestsException. May throw BadRequestException. May throw ConflictException.
Parameter apiId
:
The API identifier.
Parameter deploymentId
:
The deployment ID.
Parameter description
:
The description for the deployment resource.
Implementation
Future<UpdateDeploymentResponse> updateDeployment({
required String apiId,
required String deploymentId,
String? description,
}) async {
ArgumentError.checkNotNull(apiId, 'apiId');
ArgumentError.checkNotNull(deploymentId, 'deploymentId');
final $payload = <String, dynamic>{
if (description != null) 'description': description,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/v2/apis/${Uri.encodeComponent(apiId)}/deployments/${Uri.encodeComponent(deploymentId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateDeploymentResponse.fromJson(response);
}