'Create a new secret'

def create_secret(self):

    secret_id = None
    labels = {'ansible_key': self.data_key}
    if self.labels:
        labels.update(self.labels)
    try:
        if (not self.check_mode):
            secret_id = self.client.create_secret(self.name, self.data, labels=labels)
    except APIError as exc:
        self.client.fail(('Error    creating    secret:    %s' % to_native(exc)))
    if isinstance(secret_id, dict):
        secret_id = secret_id['ID']
    return secret_id
