UnlabelParameterVersion
Remove a label or labels from a parameter.
Request Syntax
{
"Labels": [ "string
" ],
"Name": "string
",
"ParameterVersion": number
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- Labels
-
One or more labels to delete from the specified parameter version.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 10 items.
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: Yes
- Name
-
The name of the parameter from which you want to delete one or more labels.
Note
You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 2048.
Required: Yes
- ParameterVersion
-
The specific version of the parameter which you want to delete one or more labels from. If it isn't present, the call will fail.
Type: Long
Required: Yes
Response Syntax
{
"InvalidLabels": [ "string" ],
"RemovedLabels": [ "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.
- InvalidLabels
-
The labels that aren't attached to the given parameter version.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 10 items.
Length Constraints: Minimum length of 1. Maximum length of 100.
- RemovedLabels
-
A list of all labels deleted from the parameter.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 10 items.
Length Constraints: Minimum length of 1. Maximum length of 100.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServerError
-
An error occurred on the server side.
HTTP Status Code: 500
- ParameterNotFound
-
The parameter couldn't be found. Verify the name and try again.
HTTP Status Code: 400
- ParameterVersionNotFound
-
The specified parameter version wasn't found. Verify the parameter name and version, and try again.
HTTP Status Code: 400
- TooManyUpdates
-
There are concurrent updates for a resource that supports one update at a time.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of UnlabelParameterVersion.
Sample Request
POST / HTTP/1.1
Host: ssm.us-west-2.amazonaws.com
Accept-Encoding: identity
X-Amz-Target: AmazonSSM.UnlabelParameterVersion
Content-Type: application/x-amz-json-1.1
User-Agent: aws-cli/1.17.12 Python/3.6.8 Darwin/18.7.0 botocore/1.14.12
X-Amz-Date: 20240712T183221Z
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20200325/us-east-2/ssm/aws4_request,
SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE
Content-Length: 67
{
"Name": "MyParameter",
"ParameterVersion": 2,
"Labels": [
"label"
]
}
Sample Response
{
"InvalidLabels": [],
"RemovedLabels": [
"label"
]
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: