

# AWS Cost and Usage Report


The following actions are supported by AWS Cost and Usage Report:
+  [DeleteReportDefinition](API_cur_DeleteReportDefinition.md) 
+  [DescribeReportDefinitions](API_cur_DescribeReportDefinitions.md) 
+  [ListTagsForResource](API_cur_ListTagsForResource.md) 
+  [ModifyReportDefinition](API_cur_ModifyReportDefinition.md) 
+  [PutReportDefinition](API_cur_PutReportDefinition.md) 
+  [TagResource](API_cur_TagResource.md) 
+  [UntagResource](API_cur_UntagResource.md) 

# DeleteReportDefinition


Deletes the specified report. Any tags associated with the report are also deleted.

## Request Syntax


```
{
   "ReportName": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ReportName](#API_cur_DeleteReportDefinition_RequestSyntax) **   <a name="awscostmanagement-cur_DeleteReportDefinition-request-ReportName"></a>
The name of the report that you want to delete. The name must be unique, is case sensitive, and can't include spaces.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `[0-9A-Za-z!\-_.*\'()]+`   
Required: Yes

## Response Syntax


```
{
   "ResponseMessage": "string"
}
```

## Response Elements


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

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

 ** [ResponseMessage](#API_cur_DeleteReportDefinition_ResponseSyntax) **   <a name="awscostmanagement-cur_DeleteReportDefinition-response-ResponseMessage"></a>
Whether the deletion was successful or not.  
Type: String

## Errors


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

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 500

 ** ValidationException **   
The input fails to satisfy the constraints specified by an AWS service.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

## Examples


### The following is a sample request of the DeleteReportDefinition operation.


This example illustrates one usage of DeleteReportDefinition.

#### Sample Request


```
POST / HTTP/1.1
Host: api.cur.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AWSOrigamiServiceGateway.DeleteReportDefinition
{
        "ReportName": "ExampleReport"
}
```

## See Also


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/cur-2017-01-06/DeleteReportDefinition) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cur-2017-01-06/DeleteReportDefinition) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cur-2017-01-06/DeleteReportDefinition) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cur-2017-01-06/DeleteReportDefinition) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cur-2017-01-06/DeleteReportDefinition) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cur-2017-01-06/DeleteReportDefinition) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cur-2017-01-06/DeleteReportDefinition) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cur-2017-01-06/DeleteReportDefinition) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cur-2017-01-06/DeleteReportDefinition) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cur-2017-01-06/DeleteReportDefinition) 

# DescribeReportDefinitions


Lists the AWS Cost and Usage Report available to this account.

## Request Syntax


```
{
   "MaxResults": number,
   "NextToken": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MaxResults](#API_cur_DescribeReportDefinitions_RequestSyntax) **   <a name="awscostmanagement-cur_DescribeReportDefinitions-request-MaxResults"></a>
The maximum number of results that AWS returns for the operation.  
Type: Integer  
Valid Range: Fixed value of 5.  
Required: No

 ** [NextToken](#API_cur_DescribeReportDefinitions_RequestSyntax) **   <a name="awscostmanagement-cur_DescribeReportDefinitions-request-NextToken"></a>
A generic string.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `[A-Za-z0-9_\.\-=]*`   
Required: No

## Response Syntax


```
{
   "NextToken": "string",
   "ReportDefinitions": [ 
      { 
         "AdditionalArtifacts": [ "string" ],
         "AdditionalSchemaElements": [ "string" ],
         "BillingViewArn": "string",
         "Compression": "string",
         "Format": "string",
         "RefreshClosedReports": boolean,
         "ReportName": "string",
         "ReportStatus": { 
            "lastDelivery": "string",
            "lastStatus": "string"
         },
         "ReportVersioning": "string",
         "S3Bucket": "string",
         "S3Prefix": "string",
         "S3Region": "string",
         "TimeUnit": "string"
      }
   ]
}
```

## Response Elements


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

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

 ** [NextToken](#API_cur_DescribeReportDefinitions_ResponseSyntax) **   <a name="awscostmanagement-cur_DescribeReportDefinitions-response-NextToken"></a>
A generic string.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `[A-Za-z0-9_\.\-=]*` 

 ** [ReportDefinitions](#API_cur_DescribeReportDefinitions_ResponseSyntax) **   <a name="awscostmanagement-cur_DescribeReportDefinitions-response-ReportDefinitions"></a>
An AWS Cost and Usage Report list owned by the account.  
Type: Array of [ReportDefinition](API_cur_ReportDefinition.md) objects

## Errors


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

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 500

## Examples


### The following is a sample request and response of the DescribeReportDefinitions operation.


This example illustrates one usage of DescribeReportDefinitions.

#### Sample Request


```
POST / HTTP/1.1
Host: api.cur.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AWSOrigamiServiceGateway.DescribeReportDefinitions
{
        "MaxResults": 5
}
```

#### Sample Response


```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
        "ReportDefinitions": [
        {
            "AdditionalArtifacts": ["QUICKSIGHT"],
            "AdditionalSchemaElements": ["RESOURCES"],
            "Compression": "GZIP",
            "Format": "textORcsv",
            "ReportName": "ExampleReport",
            "S3Bucket": "example-s3-bucket",
            "S3Prefix": "exampleprefix",
            "S3Region": "us-east-1",
            "TimeUnit": "HOURLY"
        },
        {
            "AdditionalArtifacts": ["QUICKSIGHT"],
            "AdditionalSchemaElements": ["RESOURCES"],
            "Compression": "GZIP",
            "Format": "textORcsv",
            "ReportName": "ExampleReport2",
            "S3Bucket": "example-s3-bucket",
            "S3Prefix": "exampleprefix",
            "S3Region": "us-east-1",
            "TimeUnit": "HOURLY"
            "ReportStatus": {
                "lastDelivery": "20191102T054923Z",
                "lastStatus": "SUCCESS"
        } 
      }
    ]
}
```

## See Also


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/cur-2017-01-06/DescribeReportDefinitions) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cur-2017-01-06/DescribeReportDefinitions) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cur-2017-01-06/DescribeReportDefinitions) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cur-2017-01-06/DescribeReportDefinitions) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cur-2017-01-06/DescribeReportDefinitions) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cur-2017-01-06/DescribeReportDefinitions) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cur-2017-01-06/DescribeReportDefinitions) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cur-2017-01-06/DescribeReportDefinitions) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cur-2017-01-06/DescribeReportDefinitions) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cur-2017-01-06/DescribeReportDefinitions) 

# ListTagsForResource


Lists the tags associated with the specified report definition.

## Request Syntax


```
{
   "ReportName": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ReportName](#API_cur_ListTagsForResource_RequestSyntax) **   <a name="awscostmanagement-cur_ListTagsForResource-request-ReportName"></a>
The report name of the report definition that tags are to be returned for.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `[0-9A-Za-z!\-_.*\'()]+`   
Required: Yes

## Response Syntax


```
{
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Response Elements


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

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

 ** [Tags](#API_cur_ListTagsForResource_ResponseSyntax) **   <a name="awscostmanagement-cur_ListTagsForResource-response-Tags"></a>
The tags assigned to the report definition resource.  
Type: Array of [Tag](API_cur_Tag.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 200 items.

## Errors


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

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The specified report (`ReportName`) in the request doesn't exist.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

 ** ValidationException **   
The input fails to satisfy the constraints specified by an AWS service.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

## Examples


### The following is a sample request of the ListTagsForResource operation.


This example illustrates one usage of ListTagsForResource.

#### Sample Request


```
POST / HTTP/1.1
Host: api.cur.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AWSOrigamiServiceGateway.ListTagsForResource
{
  "ReportName": "ExampleReport",
}
```

## See Also


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/cur-2017-01-06/ListTagsForResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cur-2017-01-06/ListTagsForResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cur-2017-01-06/ListTagsForResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cur-2017-01-06/ListTagsForResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cur-2017-01-06/ListTagsForResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cur-2017-01-06/ListTagsForResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cur-2017-01-06/ListTagsForResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cur-2017-01-06/ListTagsForResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cur-2017-01-06/ListTagsForResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cur-2017-01-06/ListTagsForResource) 

# ModifyReportDefinition


Allows you to programmatically update your report preferences.

## Request Syntax


```
{
   "ReportDefinition": { 
      "AdditionalArtifacts": [ "string" ],
      "AdditionalSchemaElements": [ "string" ],
      "BillingViewArn": "string",
      "Compression": "string",
      "Format": "string",
      "RefreshClosedReports": boolean,
      "ReportName": "string",
      "ReportStatus": { 
         "lastDelivery": "string",
         "lastStatus": "string"
      },
      "ReportVersioning": "string",
      "S3Bucket": "string",
      "S3Prefix": "string",
      "S3Region": "string",
      "TimeUnit": "string"
   },
   "ReportName": "string"
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ReportDefinition](#API_cur_ModifyReportDefinition_RequestSyntax) **   <a name="awscostmanagement-cur_ModifyReportDefinition-request-ReportDefinition"></a>
The definition of AWS Cost and Usage Report. You can specify the report name, time unit, report format, compression format, S3 bucket, additional artifacts, and schema elements in the definition.   
Type: [ReportDefinition](API_cur_ReportDefinition.md) object  
Required: Yes

 ** [ReportName](#API_cur_ModifyReportDefinition_RequestSyntax) **   <a name="awscostmanagement-cur_ModifyReportDefinition-request-ReportName"></a>
The name of the report that you want to create. The name must be unique, is case sensitive, and can't include spaces.   
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `[0-9A-Za-z!\-_.*\'()]+`   
Required: Yes

## Response Elements


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

## Errors


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

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 500

 ** ValidationException **   
The input fails to satisfy the constraints specified by an AWS service.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

## See Also


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/cur-2017-01-06/ModifyReportDefinition) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cur-2017-01-06/ModifyReportDefinition) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cur-2017-01-06/ModifyReportDefinition) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cur-2017-01-06/ModifyReportDefinition) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cur-2017-01-06/ModifyReportDefinition) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cur-2017-01-06/ModifyReportDefinition) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cur-2017-01-06/ModifyReportDefinition) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cur-2017-01-06/ModifyReportDefinition) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cur-2017-01-06/ModifyReportDefinition) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cur-2017-01-06/ModifyReportDefinition) 

# PutReportDefinition


Creates a new report using the description that you provide.

## Request Syntax


```
{
   "ReportDefinition": { 
      "AdditionalArtifacts": [ "string" ],
      "AdditionalSchemaElements": [ "string" ],
      "BillingViewArn": "string",
      "Compression": "string",
      "Format": "string",
      "RefreshClosedReports": boolean,
      "ReportName": "string",
      "ReportStatus": { 
         "lastDelivery": "string",
         "lastStatus": "string"
      },
      "ReportVersioning": "string",
      "S3Bucket": "string",
      "S3Prefix": "string",
      "S3Region": "string",
      "TimeUnit": "string"
   },
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ReportDefinition](#API_cur_PutReportDefinition_RequestSyntax) **   <a name="awscostmanagement-cur_PutReportDefinition-request-ReportDefinition"></a>
Represents the output of the PutReportDefinition operation. The content consists of the detailed metadata and data file information.   
Type: [ReportDefinition](API_cur_ReportDefinition.md) object  
Required: Yes

 ** [Tags](#API_cur_PutReportDefinition_RequestSyntax) **   <a name="awscostmanagement-cur_PutReportDefinition-request-Tags"></a>
The tags to be assigned to the report definition resource.  
Type: Array of [Tag](API_cur_Tag.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 200 items.  
Required: No

## Response Elements


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

## Errors


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

 ** DuplicateReportNameException **   
A report with the specified name already exists in the account. Specify a different report name.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 500

 ** ReportLimitReachedException **   
This account already has five reports defined. To define a new report, you must delete an existing report.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

 ** ResourceNotFoundException **   
The specified report (`ReportName`) in the request doesn't exist.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

 ** ValidationException **   
The input fails to satisfy the constraints specified by an AWS service.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

## Examples


### The following is a sample request of the PutReportDefinition operation.


This example illustrates one usage of PutReportDefinition.

#### Sample Request


```
POST / HTTP/1.1
Host: api.cur.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AWSOrigamiServiceGateway.PutReportDefinition
{
        "ReportDefinition": {
            "ReportName": "ExampleReport",
            "TimeUnit": "DAILY",
            "Format": "textORcsv",
            "Compression": "ZIP",
            "AdditionalSchemaElements": [
                "RESOURCES"
            ],
            "S3Bucket": "example-s3-bucket",
            "S3Prefix": "exampleprefix",
            "S3Region": "us-east-1",
            "AdditionalArtifacts": [
                "REDSHIFT",
                "QUICKSIGHT"
             },
        "Tags": [
          {
            "Key": "key-1",
            "Value": "value-1"
          }
        ]
}
```

## See Also


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/cur-2017-01-06/PutReportDefinition) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cur-2017-01-06/PutReportDefinition) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cur-2017-01-06/PutReportDefinition) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cur-2017-01-06/PutReportDefinition) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cur-2017-01-06/PutReportDefinition) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cur-2017-01-06/PutReportDefinition) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cur-2017-01-06/PutReportDefinition) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cur-2017-01-06/PutReportDefinition) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cur-2017-01-06/PutReportDefinition) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cur-2017-01-06/PutReportDefinition) 

# TagResource


Associates a set of tags with a report definition.

## Request Syntax


```
{
   "ReportName": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ReportName](#API_cur_TagResource_RequestSyntax) **   <a name="awscostmanagement-cur_TagResource-request-ReportName"></a>
The report name of the report definition that tags are to be associated with.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `[0-9A-Za-z!\-_.*\'()]+`   
Required: Yes

 ** [Tags](#API_cur_TagResource_RequestSyntax) **   <a name="awscostmanagement-cur_TagResource-request-Tags"></a>
The tags to be assigned to the report definition resource.  
Type: Array of [Tag](API_cur_Tag.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 200 items.  
Required: Yes

## Response Elements


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

## Errors


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

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The specified report (`ReportName`) in the request doesn't exist.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

 ** ValidationException **   
The input fails to satisfy the constraints specified by an AWS service.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

## Examples


### The following is a sample request of the TagResource operation.


This example illustrates one usage of TagResource.

#### Sample Request


```
POST / HTTP/1.1
Host: api.cur.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AWSOrigamiServiceGateway.TagResource
{
  "ReportName": "ExampleReport",
  "Tags": [
    {
      "Key": "key-1",
      "Value": "value-1"
    }
  ]
}
```

## See Also


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/cur-2017-01-06/TagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cur-2017-01-06/TagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cur-2017-01-06/TagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cur-2017-01-06/TagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cur-2017-01-06/TagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cur-2017-01-06/TagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cur-2017-01-06/TagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cur-2017-01-06/TagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cur-2017-01-06/TagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cur-2017-01-06/TagResource) 

# UntagResource


Disassociates a set of tags from a report definition.

## Request Syntax


```
{
   "ReportName": "string",
   "TagKeys": [ "string" ]
}
```

## Request Parameters


For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ReportName](#API_cur_UntagResource_RequestSyntax) **   <a name="awscostmanagement-cur_UntagResource-request-ReportName"></a>
The report name of the report definition that tags are to be disassociated from.  
Type: String  
Length Constraints: Maximum length of 256.  
Pattern: `[0-9A-Za-z!\-_.*\'()]+`   
Required: Yes

 ** [TagKeys](#API_cur_UntagResource_RequestSyntax) **   <a name="awscostmanagement-cur_UntagResource-request-TagKeys"></a>
The tags to be disassociated from the report definition resource.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 200 items.  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `.*`   
Required: Yes

## Response Elements


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

## Errors


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

 ** InternalErrorException **   
An error on the server occurred during the processing of your request. Try again later.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The specified report (`ReportName`) in the request doesn't exist.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

 ** ValidationException **   
The input fails to satisfy the constraints specified by an AWS service.    
 ** Message **   
A message to show the detail of the exception.
HTTP Status Code: 400

## Examples


### The following is a sample request of the UntagResource operation.


This example illustrates one usage of UntagResource.

#### Sample Request


```
POST / HTTP/1.1
Host: api.cur.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AWSOrigamiServiceGateway.UntagResource
{
  "ReportName": "ExampleReport",
  "TagKeys": ["tag-1", "tag-2"]
}
```

## See Also


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/cur-2017-01-06/UntagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/cur-2017-01-06/UntagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/cur-2017-01-06/UntagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/cur-2017-01-06/UntagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/cur-2017-01-06/UntagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/cur-2017-01-06/UntagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/cur-2017-01-06/UntagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/cur-2017-01-06/UntagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/cur-2017-01-06/UntagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/cur-2017-01-06/UntagResource) 