def create_from_yaml(<EOL>k8s_client,<EOL>yaml_file,<EOL>verbose=False,<EOL>**kwargs):
with open(path.abspath(yaml_file)) as f:<EOL><INDENT>yml_document_all = yaml.safe_load_all(f)<EOL>api_exceptions = []<EOL>for yml_document in yml_document_all:<EOL><INDENT>if "<STR_LIT>" in yml_document["<STR_LIT>"]:<EOL><INDENT>kind = yml_document["<STR_LIT>"].replace("<STR_LIT>", "<STR_LIT>")<EOL>for yml_object in yml_document["<STR_LIT>"]:<EOL><INDENT>if kind is not "<STR_LIT>":<EOL><INDENT>yml_object["<STR_LIT>"] = yml_document["<STR_LIT>"]<EOL>yml_object["<STR_LIT>"] = kind<EOL><DEDENT>try:<EOL><INDENT>create_from_yaml_single_item(<EOL>k8s_client, yml_object, verbose, **kwargs)<EOL><DEDENT>except client.rest.ApiException as api_exception:<EOL><INDENT>api_exceptions.append(api_exception)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>create_from_yaml_single_item(<EOL>k8s_client, yml_document, verbose, **kwargs)<EOL><DEDENT>except client.rest.ApiException as api_exception:<EOL><INDENT>api_exceptions.append(api_exception)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if api_exceptions:<EOL><INDENT>raise FailToCreateError(api_exceptions)<EOL><DEDENT>
Perform an action from a yaml file. Pass True for verbose to
print confirmation information.
Input:
yaml_file: string. Contains the path to yaml file.
k8s_client: an ApiClient object, initialized with the client args.
verbose: If True, print confirmation from the create action.
    Default is False.

Returns:
An k8s api object or list of apis objects created from YAML.
When a single object is generated, return type is dependent
on output_list.

Throws a FailToCreateError exception if creation of any object
fails with helpful messages from the server.

Available parameters for creating <kind>:
:param async_req bool
:param bool include_uninitialized: If true, partially initialized
    resources are included in the response.
:param str pretty: If 'true', then the output is pretty printed.
:param str dry_run: When present, indicates that modifications
    should not be persisted. An invalid or unrecognized dryRun
    directive will result in an error response and no further
    processing of the request.
    Valid values are: - All: all dry run stages will be processed