deleteDeploymentByKey method

Future<void> deleteDeploymentByKey({
  1. required String pipelineId,
  2. required String environmentId,
  3. required int deploymentSequenceNumber,
  4. int? updateSequenceNumber,
})

Delete the currently stored deployment data for the given pipelineId, environmentId and deploymentSequenceNumber combination.

Deletion is performed asynchronously. The getDeploymentByKey operation can be used to confirm that data has been deleted successfully (if needed).

Only Connect apps that define the jiraDeploymentInfoProvider module, and on-premise integrations, can access this resource. This resource requires the 'DELETE' scope for Connect apps.

Implementation

Future<void> deleteDeploymentByKey(
    {required String pipelineId,
    required String environmentId,
    required int deploymentSequenceNumber,
    int? updateSequenceNumber}) async {
  await _client.send(
    'delete',
    'rest/deployments/0.1/pipelines/{pipelineId}/environments/{environmentId}/deployments/{deploymentSequenceNumber}',
    pathParameters: {
      'pipelineId': pipelineId,
      'environmentId': environmentId,
      'deploymentSequenceNumber': '$deploymentSequenceNumber',
    },
    queryParameters: {
      if (updateSequenceNumber != null)
        '_updateSequenceNumber': '$updateSequenceNumber',
    },
  );
}