Skip to content

untag_resource

untag_resource(
    arn: NotificationRuleArn,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[codestarnotificationsClientConfig] = None,
) -> UntagResourceResult

Removes the association between one or more provided tags and a notification rule.

Parameters:

  • arn (NotificationRuleArn) –

    The Amazon Resource Name (ARN) of the notification rule from which to remove the tags.

  • tag_keys (TagKeys) –

    The key names of the tags to remove.

Raises:

  • ConcurrentModificationException –

    CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again.

  • LimitExceededException –

    One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits.

  • ResourceNotFoundException –

    CodeStar Notifications can't find a resource that matches the provided ARN.

  • ValidationException –

    One or more parameter values are not valid.

  • UnknownServiceError –

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

Source code in docs_src/capo_codestar_notifications/_services/codestarnotifications.py
def untag_resource(
    self,
    arn: "capo_codestar_notifications.types.notification_rule_arn.NotificationRuleArn",
    tag_keys: "capo_codestar_notifications.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[codestarnotificationsClientConfig] = None,
) -> "capo_codestar_notifications.types.untag_resource_result.UntagResourceResult":
    """<p>Removes the association between one or more provided tags and a notification rule.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the notification rule from which to remove the tags.</p>
        tag_keys: <p>The key names of the tags to remove.</p>

    Raises:
        capo_codestar_notifications.errors.concurrent_modification_exception.ConcurrentModificationException: <p>CodeStar Notifications can't complete the request because the resource is being modified by another process. Wait a few minutes and try again.</p>
        capo_codestar_notifications.errors.limit_exceeded_exception.LimitExceededException: <p>One of the CodeStar Notifications limits has been exceeded. Limits apply to accounts, notification rules, notifications, resources, and targets. For more information, see Limits.</p>
        capo_codestar_notifications.errors.resource_not_found_exception.ResourceNotFoundException: <p>CodeStar Notifications can't find a resource that matches the provided ARN. </p>
        capo_codestar_notifications.errors.validation_exception.ValidationException: <p>One or more parameter values are not valid.</p>
        capo_codestar_notifications.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codestar_notifications.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[
        "capo_codestar_notifications.types.untag_resource_result.UntagResourceResult"
    ]:
        import capo_codestar_notifications._operations.code_star_notifications_20191015.untag_resource

        output, http_response = (
            capo_codestar_notifications._operations.code_star_notifications_20191015.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_codestar_notifications.types.untag_resource_request.UntagResourceRequest = {
        "arn": arn,
        "tag_keys": tag_keys,
    }

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