Skip to content

untag_resource

untag_resource(
    tag_keys: TagKeyList,
    resource_arn: ResourceARN,
    *,
    config_overrides: Optional[KinesisClientConfig] = None,
    stream_id: Optional[StreamId] = None,
) -> None

Removes tags from the specified Kinesis resource. Removed tags are deleted and can't be recovered after this operation completes successfully.

Parameters:

  • tag_keys (TagKeyList) –

    A list of tag key-value pairs. Existing tags of the resource whose keys are members of this list will be removed from the Kinesis resource.

  • resource_arn (ResourceARN) –

    The Amazon Resource Name (ARN) of the Kinesis resource from which to remove tags.

  • stream_id (Optional[StreamId], default: None ) –

    Not Implemented. Reserved for future use.

Raises:

  • AccessDeniedException –

    Specifies that you do not have the permissions required to perform this operation.

  • InvalidArgumentException –

    A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.

  • LimitExceededException –

    The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed.

  • ResourceInUseException –

    The resource is not available for this operation. For successful operation, the resource must be in the ACTIVE state.

  • ResourceNotFoundException –

    The requested resource could not be found. The stream might not be specified correctly.

  • UnknownServiceError –

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

Source code in docs_src/capo_kinesis/_services/kinesis.py
def untag_resource(
    self,
    tag_keys: "capo_kinesis.types.tag_key_list.TagKeyList",
    resource_arn: "capo_kinesis.types.resource_arn.ResourceARN",
    *,
    config_overrides: Optional[KinesisClientConfig] = None,
    stream_id: Optional["capo_kinesis.types.stream_id.StreamId"] = None,
) -> None:
    """<p>Removes tags from the specified Kinesis resource. Removed tags are deleted and can't be recovered after this operation completes successfully.</p>

    Args:
        tag_keys: <p>A list of tag key-value pairs. Existing tags of the resource whose keys are members of this list will be removed from the Kinesis resource.</p>
        resource_arn: <p>The Amazon Resource Name (ARN) of the Kinesis resource from which to remove tags.</p>
        stream_id: <p>Not Implemented. Reserved for future use.</p>

    Raises:
        capo_kinesis.errors.access_denied_exception.AccessDeniedException: <p>Specifies that you do not have the permissions required to perform this operation.</p>
        capo_kinesis.errors.invalid_argument_exception.InvalidArgumentException: <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p>
        capo_kinesis.errors.limit_exceeded_exception.LimitExceededException: <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p>
        capo_kinesis.errors.resource_in_use_exception.ResourceInUseException: <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p>
        capo_kinesis.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found. The stream might not be specified correctly.</p>
        capo_kinesis.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_kinesis.types.untag_resource_input.UntagResourceInput]",
    ) -> OperationResponse[None]:
        import capo_kinesis._operations.kinesis_20131202.untag_resource

        output, http_response = (
            capo_kinesis._operations.kinesis_20131202.untag_resource.untag_resource(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UntagResource")
    )
    input_: capo_kinesis.types.untag_resource_input.UntagResourceInput = {
        "tag_keys": tag_keys,
        "resource_arn": resource_arn,
    }
    if stream_id is not None:
        input_["stream_id"] = stream_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output