@is_connected<EOL><INDENT>def check(self,<EOL>uid=None,<EOL>usage_limits_count=None,<EOL>cryptographic_usage_mask=None,<EOL>lease_time=None):<DEDENT>
if uid is not None:<EOL><INDENT>if not isinstance(uid, six.string_types):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT><DEDENT>if usage_limits_count is not None:<EOL><INDENT>if not isinstance(usage_limits_count, six.integer_types):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT><DEDENT>if cryptographic_usage_mask is not None:<EOL><INDENT>if not isinstance(cryptographic_usage_mask, list) ornot all(isinstance(<EOL>x,<EOL>enums.CryptographicUsageMask<EOL>) for x in cryptographic_usage_mask):<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>if lease_time is not None:<EOL><INDENT>if not isinstance(lease_time, six.integer_types):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT><DEDENT>result = self.proxy.check(<EOL>uid,<EOL>usage_limits_count,<EOL>cryptographic_usage_mask,<EOL>lease_time<EOL>)<EOL>status = result.get('<STR_LIT>')<EOL>if status == enums.ResultStatus.SUCCESS:<EOL><INDENT>return result.get('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>raise exceptions.KmipOperationFailure(<EOL>status,<EOL>result.get('<STR_LIT>'),<EOL>result.get('<STR_LIT>')<EOL>)<EOL><DEDENT>
Check the constraints for a managed object.

Args:
    uid (string): The unique ID of the managed object to check.
        Optional, defaults to None.
    usage_limits_count (int): The number of items that can be secured
        with the specified managed object. Optional, defaults to None.
    cryptographic_usage_mask (list): A list of CryptographicUsageMask
        enumerations specifying the operations possible with the
        specified managed object. Optional, defaults to None.
    lease_time (int): The number of seconds that can be leased for the
        specified managed object. Optional, defaults to None.