deletePullThroughCacheRule method

Future<DeletePullThroughCacheRuleResponse> deletePullThroughCacheRule({
  1. required String ecrRepositoryPrefix,
  2. String? registryId,
})

Deletes a pull through cache rule.

May throw InvalidParameterException. May throw PullThroughCacheRuleNotFoundException. May throw ServerException. May throw ValidationException.

Parameter ecrRepositoryPrefix : The Amazon ECR repository prefix associated with the pull through cache rule to delete.

Parameter registryId : The Amazon Web Services account ID associated with the registry that contains the pull through cache rule. If you do not specify a registry, the default registry is assumed.

Implementation

Future<DeletePullThroughCacheRuleResponse> deletePullThroughCacheRule({
  required String ecrRepositoryPrefix,
  String? registryId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AmazonEC2ContainerRegistry_V20150921.DeletePullThroughCacheRule'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ecrRepositoryPrefix': ecrRepositoryPrefix,
      if (registryId != null) 'registryId': registryId,
    },
  );

  return DeletePullThroughCacheRuleResponse.fromJson(jsonResponse.body);
}