UpdateMetricMetadata
Updates the name and/or description of an existing metric in the specified Connect Customer instance.
Request Syntax
POST /metrics/definitions/InstanceId/MetricId/metadata HTTP/1.1
Content-type: application/json
{
"Description": "string",
"Name": "string"
}
URI Request Parameters
The request uses the following URI parameters.
- InstanceId
-
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: Yes
- MetricId
-
The identifier of the metric to update. Adding the
$SAVEDqualifier will update the saved version of the metric. Adding$LATESTor omitting a qualifier will update the published version.Length Constraints: Minimum length of 1. Maximum length of 150.
Required: Yes
Request Body
The request accepts the following data in JSON format.
- Description
-
The updated description of the metric.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 500.
Required: No
- Name
-
The updated name of the metric.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Required: No
Response Syntax
HTTP/1.1 200
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.
- AccessDeniedException
-
You do not have sufficient permissions to perform this action.
HTTP Status Code: 403
- DuplicateResourceException
-
A resource with the specified name already exists.
HTTP Status Code: 409
- InternalServiceException
-
Request processing failed because of an error or failure with the service.
- Message
-
The message.
HTTP Status Code: 500
- InvalidParameterException
-
One or more of the specified parameters are not valid.
- Message
-
The message about the parameters.
HTTP Status Code: 400
- InvalidRequestException
-
The request is not valid.
- Message
-
The message about the request.
- Reason
-
Reason why the request was invalid.
HTTP Status Code: 400
- ResourceNotFoundException
-
The specified resource was not found.
- Message
-
The message about the resource.
HTTP Status Code: 404
- ThrottlingException
-
The throttling limit has been exceeded.
HTTP Status Code: 429
Examples
Example
The following example updates the name and description of a metric.
Sample Request
{
"Name": "updated-example-metric",
"Description": "A new description for my custom metric"
}
Sample Response
{}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: