Skip to content

unlabel_parameter_version async

unlabel_parameter_version(
    name: PSParameterName,
    parameter_version: PSParameterVersion,
    labels: ParameterLabelList,
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
) -> UnlabelParameterVersionResult

Remove a label or labels from a parameter.

Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a ValidationException error.

Parameters:

  • name (PSParameterName) –

    The name of the parameter from which you want to delete one or more labels.

    You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.

  • parameter_version (PSParameterVersion) –

    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.

  • labels (ParameterLabelList) –

    One or more labels to delete from the specified parameter version.

Raises:

  • InternalServerError –

    An error occurred on the server side.

  • ParameterNotFound –

    The parameter couldn't be found. Verify the name and try again.

    For the DeleteParameter and GetParameter actions, if the specified parameter doesn't exist, the ParameterNotFound exception is not recorded in CloudTrail event logs.

  • ParameterVersionNotFound –

    The specified parameter version wasn't found. Verify the parameter name and version, and try again.

  • TooManyUpdates –

    There are concurrent updates for a resource that supports one update at a time.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_ssm/_services/async_ssm.py
async def unlabel_parameter_version(
    self,
    name: "capo_ssm.types.ps_parameter_name.PSParameterName",
    parameter_version: "capo_ssm.types.ps_parameter_version.PSParameterVersion",
    labels: "capo_ssm.types.parameter_label_list.ParameterLabelList",
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
) -> (
    "capo_ssm.types.unlabel_parameter_version_result.UnlabelParameterVersionResult"
):
    """<p>Remove a label or labels from a parameter.</p> <p>Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a <code>ValidationException</code> error.</p>

    Args:
        name: <p>The name of the parameter from which you want to delete one or more labels.</p> <note> <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p> </note>
        parameter_version: <p>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.</p>
        labels: <p>One or more labels to delete from the specified parameter version.</p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.parameter_not_found.ParameterNotFound: <p>The parameter couldn't be found. Verify the name and try again.</p> <note> <p>For the <code>DeleteParameter</code> and <code>GetParameter</code> actions, if the specified parameter doesn't exist, the <code>ParameterNotFound</code> exception is <i>not</i> recorded in CloudTrail event logs.</p> </note>
        capo_ssm.errors.parameter_version_not_found.ParameterVersionNotFound: <p>The specified parameter version wasn't found. Verify the parameter name and version, and try again.</p>
        capo_ssm.errors.too_many_updates.TooManyUpdates: <p>There are concurrent updates for a resource that supports one update at a time.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm.types.unlabel_parameter_version_request.UnlabelParameterVersionRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm.types.unlabel_parameter_version_result.UnlabelParameterVersionResult"
    ]:
        import capo_ssm._operations.amazon_ssm.unlabel_parameter_version

        (
            output,
            http_response,
        ) = await capo_ssm._operations.amazon_ssm.unlabel_parameter_version.async_unlabel_parameter_version(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UnlabelParameterVersion")
    )
    input_: capo_ssm.types.unlabel_parameter_version_request.UnlabelParameterVersionRequest = {
        "name": name,
        "parameter_version": parameter_version,
        "labels": labels,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output