deleteAssociation method

Future<DeleteAssociationResponse> deleteAssociation({
  1. required String destinationArn,
  2. required String sourceArn,
})

Deletes an association.

May throw ResourceNotFound.

Parameter destinationArn : The Amazon Resource Name (ARN) of the destination.

Parameter sourceArn : The ARN of the source.

Implementation

Future<DeleteAssociationResponse> deleteAssociation({
  required String destinationArn,
  required String sourceArn,
}) async {
  ArgumentError.checkNotNull(destinationArn, 'destinationArn');
  _s.validateStringLength(
    'destinationArn',
    destinationArn,
    0,
    256,
    isRequired: true,
  );
  ArgumentError.checkNotNull(sourceArn, 'sourceArn');
  _s.validateStringLength(
    'sourceArn',
    sourceArn,
    0,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.DeleteAssociation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DestinationArn': destinationArn,
      'SourceArn': sourceArn,
    },
  );

  return DeleteAssociationResponse.fromJson(jsonResponse.body);
}