

# DeleteDataset
<a name="API_DeleteDataset"></a>

Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException.

This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

## Request Syntax
<a name="API_DeleteDataset_RequestSyntax"></a>

```
DELETE /identitypools/IdentityPoolId/identities/IdentityId/datasets/DatasetName HTTP/1.1
```

## URI Request Parameters
<a name="API_DeleteDataset_RequestParameters"></a>

The request uses the following URI parameters.

 ** [DatasetName](#API_DeleteDataset_RequestSyntax) **   <a name="Cognito-DeleteDataset-request-uri-DatasetName"></a>
A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '\$1' (underscore), '-' (dash), and '.' (dot).   
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[a-zA-Z0-9_.:-]+`   
Required: Yes

 ** [IdentityId](#API_DeleteDataset_RequestSyntax) **   <a name="Cognito-DeleteDataset-request-uri-IdentityId"></a>
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.  
Length Constraints: Minimum length of 1. Maximum length of 55.  
Pattern: `[\w-]+:[0-9a-f-]+`   
Required: Yes

 ** [IdentityPoolId](#API_DeleteDataset_RequestSyntax) **   <a name="Cognito-DeleteDataset-request-uri-IdentityPoolId"></a>
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.  
Length Constraints: Minimum length of 1. Maximum length of 55.  
Pattern: `[\w-]+:[0-9a-f-]+`   
Required: Yes

## Request Body
<a name="API_DeleteDataset_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_DeleteDataset_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Dataset": { 
      "CreationDate": number,
      "DatasetName": "string",
      "DataStorage": number,
      "IdentityId": "string",
      "LastModifiedBy": "string",
      "LastModifiedDate": number,
      "NumRecords": number
   }
}
```

## Response Elements
<a name="API_DeleteDataset_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Dataset](#API_DeleteDataset_ResponseSyntax) **   <a name="Cognito-DeleteDataset-response-Dataset"></a>
A collection of data for an identity pool. An identity pool can have multiple datasets. A dataset is per identity and can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don't exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.  
Type: [Dataset](API_Dataset.md) object

## Errors
<a name="API_DeleteDataset_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalErrorException **   
Indicates an internal service error.    
 ** message **   
Message returned by InternalErrorException.
HTTP Status Code: 500

 ** InvalidParameterException **   
Thrown when a request parameter does not comply with the associated constraints.    
 ** message **   
Message returned by InvalidParameterException.
HTTP Status Code: 400

 ** NotAuthorizedException **   
Thrown when a user is not authorized to access the requested resource.    
 ** message **   
The message returned by a NotAuthorizedException.
HTTP Status Code: 403

 ** ResourceConflictException **   
Thrown if an update can't be applied because the resource was changed by another call and this would result in a conflict.    
 ** message **   
The message returned by a ResourceConflictException.
HTTP Status Code: 409

 ** ResourceNotFoundException **   
Thrown if the resource doesn't exist.    
 ** message **   
Message returned by a ResourceNotFoundException.
HTTP Status Code: 404

 ** TooManyRequestsException **   
Thrown if the request is throttled.    
 ** message **   
Message returned by a TooManyRequestsException.
HTTP Status Code: 429

## See Also
<a name="API_DeleteDataset_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/cognito-sync-2014-06-30/DeleteDataset) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cognito-sync-2014-06-30/DeleteDataset) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cognito-sync-2014-06-30/DeleteDataset) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cognito-sync-2014-06-30/DeleteDataset) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cognito-sync-2014-06-30/DeleteDataset) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cognito-sync-2014-06-30/DeleteDataset) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cognito-sync-2014-06-30/DeleteDataset) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cognito-sync-2014-06-30/DeleteDataset) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cognito-sync-2014-06-30/DeleteDataset) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cognito-sync-2014-06-30/DeleteDataset) 