How to use the azure-mgmt-media.azure.mgmt.media.models.StreamingEntityScaleUnit function in azure-mgmt-media

To help you get started, we’ve selected a few azure-mgmt-media examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-python / azure-mgmt-media / azure / mgmt / media / operations / streaming_endpoints_operations.py View on Github external
def _scale_initial(
            self, resource_group_name, account_name, streaming_endpoint_name, scale_unit=None, custom_headers=None, raw=False, **operation_config):
        parameters = models.StreamingEntityScaleUnit(scale_unit=scale_unit)

        # Construct URL
        url = self.scale.metadata['url']
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
            'accountName': self._serialize.url("account_name", account_name, 'str'),
            'streamingEndpointName': self._serialize.url("streaming_endpoint_name", streaming_endpoint_name, 'str', max_length=24, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers