def create_key(policy=None, description=None, key_usage=None, region=None,
               key=None, keyid=None, profile=None):
    '''
    Creates a master key.

    CLI example::

        salt myminion boto_kms.create_key '{"Statement":...}' "My master key"
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    r = {}
    _policy = salt.serializers.json.serialize(policy)
    try:
        key_metadata = conn.create_key(
            _policy,
            description=description,
            key_usage=key_usage
        )
        r['key_metadata'] = key_metadata['KeyMetadata']
    except boto.exception.BotoServerError as e:
        r['error'] = __utils__['boto.get_error'](e)
    return r
def create_key ( policy = None , description = None , key_usage = None , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) r = { } _policy = salt . serializers . json . serialize ( policy ) try : key_metadata = conn . create_key ( _policy , description = description , key_usage = key_usage ) r [ 'key_metadata' ] = key_metadata [ 'KeyMetadata' ] except boto . exception . BotoServerError as e : r [ 'error' ] = __utils__ [ 'boto.get_error' ] ( e ) return r
Creates a master key.

    CLI example::

        salt myminion boto_kms.create_key '{"Statement":...}' "My master key"