def create_deployment(self, service_name, deployment_slot, name,<EOL>package_url, label, configuration,<EOL>start_deployment=False,<EOL>treat_warnings_as_error=False,<EOL>extended_properties=None):
_validate_not_none('<STR_LIT>', service_name)<EOL>_validate_not_none('<STR_LIT>', deployment_slot)<EOL>_validate_not_none('<STR_LIT:name>', name)<EOL>_validate_not_none('<STR_LIT>', package_url)<EOL>_validate_not_none('<STR_LIT:label>', label)<EOL>_validate_not_none('<STR_LIT>', configuration)<EOL>return self._perform_post(<EOL>self._get_deployment_path_using_slot(<EOL>service_name, deployment_slot),<EOL>_XmlSerializer.create_deployment_to_xml(<EOL>name,<EOL>package_url,<EOL>label,<EOL>configuration,<EOL>start_deployment,<EOL>treat_warnings_as_error,<EOL>extended_properties),<EOL>as_async=True)<EOL>
Uploads a new service package and creates a new deployment on staging
or production.

service_name:
    Name of the hosted service.
deployment_slot:
    The environment to which the hosted service is deployed. Valid
    values are: staging, production
name:
    The name for the deployment. The deployment name must be unique
    among other deployments for the hosted service.
package_url:
    A URL that refers to the location of the service package in the
    Blob service. The service package can be located either in a
    storage account beneath the same subscription or a Shared Access
    Signature (SAS) URI from any storage account.
label:
    A name for the hosted service. The name can be up to 100 characters
    in length. It is recommended that the label be unique within the
    subscription. The name can be used to identify the hosted service
    for your tracking purposes.
configuration:
    The base-64 encoded service configuration file for the deployment.
start_deployment:
    Indicates whether to start the deployment immediately after it is
    created. If false, the service model is still deployed to the
    virtual machines but the code is not run immediately. Instead, the
    service is Suspended until you call Update Deployment Status and
    set the status to Running, at which time the service will be
    started. A deployed service still incurs charges, even if it is
    suspended.
treat_warnings_as_error:
    Indicates whether to treat package validation warnings as errors.
    If set to true, the Created Deployment operation fails if there
    are validation warnings on the service package.
extended_properties:
    Dictionary containing name/value pairs of storage account
    properties. You can have a maximum of 50 extended property
    name/value pairs. The maximum length of the Name element is 64
    characters, only alphanumeric characters and underscores are valid
    in the Name, and the name must start with a letter. The value has
    a maximum length of 255 characters.