code string | signature string | docstring string | loss_without_docstring float64 | loss_with_docstring float64 | factor float64 |
|---|---|---|---|---|---|
'''Save an object to Instapaper after instantiating it.
Example::
folder = Folder(instapaper, title='stuff')
result = folder.add()
'''
# TODO validation per object type
submit_attribs = {}
for attrib in self.ATTRIBUTES:
val = getattr(... | def add(self) | Save an object to Instapaper after instantiating it.
Example::
folder = Folder(instapaper, title='stuff')
result = folder.add() | 6.873816 | 3.712102 | 1.851731 |
'''Issue a request for an API method whose only param is the obj ID.
:param str action: The name of the action for the resource
:returns: Response from the API
:rtype: dict
'''
if not action:
raise Exception('No simple action defined')
path = "/".join... | def _simple_action(self, action=None) | Issue a request for an API method whose only param is the obj ID.
:param str action: The name of the action for the resource
:returns: Response from the API
:rtype: dict | 6.891215 | 3.533226 | 1.950403 |
'''Get highlights for Bookmark instance.
:return: list of ``Highlight`` objects
:rtype: list
'''
# NOTE: all Instapaper API methods use POST except this one!
path = '/'.join([self.RESOURCE, str(self.object_id), 'highlights'])
response = self.client.request(path, ... | def get_highlights(self) | Get highlights for Bookmark instance.
:return: list of ``Highlight`` objects
:rtype: list | 4.169503 | 3.612775 | 1.1541 |
if self.interval is not None:
self._queue.put_nowait(None)
self._thread.join()
self.interval = None | def stop(self) | Tell the sender thread to finish and wait for it to stop sending
(should be at most "timeout" seconds). | 4.235915 | 4.258329 | 0.994736 |
if not metric or metric.split(None, 1)[0] != metric:
raise ValueError('"metric" must not have whitespace in it')
if not isinstance(value, (int, float)):
raise TypeError('"value" must be an int or a float, not a {}'.format(
type(value).__name__))
... | def build_message(self, metric, value, timestamp, tags={}) | Build a Graphite message to send and return it as a byte string. | 3.191593 | 3.010307 | 1.060222 |
if timestamp is None:
timestamp = time.time()
message = self.build_message(metric, value, timestamp, tags)
if self.interval is None:
self.send_socket(message)
else:
try:
self._queue.put_nowait(message)
except queue... | def send(self, metric, value, timestamp=None, tags={}) | Send given metric and (int or float) value to Graphite host.
Performs send on background thread if "interval" was specified when
creating this Sender.
If a "tags" dict is specified, send the tags to the Graphite host along with the metric. | 2.851221 | 2.957109 | 0.964192 |
if self.log_sends:
start_time = time.time()
try:
self.send_message(message)
except Exception as error:
logger.error('error sending message {!r}: {}'.format(message, error))
else:
if self.log_sends:
elapsed_time = ti... | def send_socket(self, message) | Low-level function to send message bytes to this Sender's socket.
You should usually call send() instead of this function (unless you're
subclassing or writing unit tests). | 2.567471 | 2.507048 | 1.024102 |
last_check_time = time.time()
messages = []
while True:
# Get first message from queue, blocking until the next time we
# should be sending
time_since_last_check = time.time() - last_check_time
time_till_next_check = max(0, self.interval -... | def _thread_loop(self) | Background thread used when Sender is in asynchronous/interval mode. | 2.615678 | 2.55371 | 1.024266 |
'''Main routine.'''
# validate command line arguments
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument(
'--vmssname', '-n', required=True, action='store', help='VMSS Name')
arg_parser.add_argument('--rgname', '-g', required=True, action='store',
help... | def main() | Main routine. | 1.777119 | 1.761429 | 1.008907 |
'''Main routine.'''
# process arguments
if len(sys.argv) < 3:
usage()
rgname = sys.argv[1]
vmss_name = sys.argv[2]
# Load Azure app defaults
try:
with open('azurermconfig.json') as config_file:
config_data = json.load(config_file)
except FileNotFoundError:
... | def main() | Main routine. | 1.892445 | 1.897234 | 0.997476 |
'''get a resource group name from a VMSS ID string'''
rgname = re.search('Groups/(.+?)/providers', vmss_id).group(1)
print('Resource group: ' + rgname)
return rgname | def get_rg_from_id(vmss_id) | get a resource group name from a VMSS ID string | 4.778095 | 3.947483 | 1.210416 |
'''main routine'''
# Load Azure app defaults
try:
with open('azurermconfig.json') as config_file:
config_data = json.load(config_file)
except FileNotFoundError:
sys.exit('Error: Expecting azurermconfig.json in current folder')
tenant_id = config_data['tenantId']
app_... | def main() | main routine | 1.862582 | 1.864832 | 0.998793 |
'''User-Agent Header. Sends library identification to Azure endpoint.
'''
version = pkg_resources.require("azurerm")[0].version
user_agent = "python/{} ({}) requests/{} azurerm/{}".format(
platform.python_version(),
platform.platform(),
requests.__version__,
version)
... | def get_user_agent() | User-Agent Header. Sends library identification to Azure endpoint. | 6.032724 | 3.666902 | 1.645183 |
'''Do an HTTP GET request and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body.
'''
headers = {"Authorization": 'Bearer ' + access_token}
headers['Use... | def do_get(endpoint, access_token) | Do an HTTP GET request and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body. | 3.795746 | 2.124427 | 1.786715 |
'''Do an HTTP GET request, follow the nextLink chain and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body.
'''
headers = {"Authorization": 'Bearer ' + acc... | def do_get_next(endpoint, access_token) | Do an HTTP GET request, follow the nextLink chain and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body. | 3.406686 | 2.344205 | 1.453237 |
'''Do an HTTP GET request and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response.
'''
headers = {"Authorization": 'Bearer ' + access_token}
headers['User-Agent'] =... | def do_delete(endpoint, access_token) | Do an HTTP GET request and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. | 4.055376 | 2.285053 | 1.77474 |
'''Do an HTTP PATCH request and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
body (str): JSON body of information to patch.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body.
'''
headers = {"c... | def do_patch(endpoint, body, access_token) | Do an HTTP PATCH request and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
body (str): JSON body of information to patch.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body. | 3.385607 | 1.86212 | 1.818147 |
'''Do an HTTP POST request and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
body (str): JSON body of information to post.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body.
'''
headers = {"con... | def do_post(endpoint, body, access_token) | Do an HTTP POST request and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
body (str): JSON body of information to post.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body. | 3.421366 | 1.851929 | 1.84746 |
'''Do an HTTP PUT request and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
body (str): JSON body of information to put.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body.
'''
headers = {"conte... | def do_put(endpoint, body, access_token) | Do an HTTP PUT request and return JSON.
Args:
endpoint (str): Azure Resource Manager management endpoint.
body (str): JSON body of information to put.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body. | 3.440017 | 1.856028 | 1.853429 |
'''Get Media Services Final Endpoint URL.
Args:
access_token (str): A valid Azure authentication token.
endpoint (str): Azure Media Services Initial Endpoint.
flag (bol): flag.
Returns:
HTTP response. JSON body.
'''
return do_ams_get_url(endpoint, access_token, flag) | def get_url(access_token, endpoint=ams_rest_endpoint, flag=True) | Get Media Services Final Endpoint URL.
Args:
access_token (str): A valid Azure authentication token.
endpoint (str): Azure Media Services Initial Endpoint.
flag (bol): flag.
Returns:
HTTP response. JSON body. | 7.744025 | 2.338899 | 3.31097 |
'''Acquire Media Services Authentication Token.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
body (str): A Content Body.
Returns:
HTTP response. JSON body.
'''
headers = {"content-type": "application/x-www-form-urlencoded",
"Accept": json_accep... | def do_ams_auth(endpoint, body) | Acquire Media Services Authentication Token.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
body (str): A Content Body.
Returns:
HTTP response. JSON body. | 6.218786 | 2.685678 | 2.315536 |
'''Do a AMS HTTP PUT request and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
path (str): Azure Media Services Endpoint Path.
body (str): Azure Media Services Content Body.
access_token (str): A valid Azure authentication token.
rformat (str)... | def do_ams_put(endpoint, path, body, access_token, rformat="json", ds_min_version="3.0;NetFx") | Do a AMS HTTP PUT request and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
path (str): Azure Media Services Endpoint Path.
body (str): Azure Media Services Content Body.
access_token (str): A valid Azure authentication token.
rformat (str): A req... | 4.082647 | 2.739539 | 1.490268 |
'''Do a AMS HTTP POST request and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
path (str): Azure Media Services Endpoint Path.
body (str): Azure Media Services Content Body.
access_token (str): A valid Azure authentication token.
rformat (str... | def do_ams_post(endpoint, path, body, access_token, rformat="json", ds_min_version="3.0;NetFx") | Do a AMS HTTP POST request and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
path (str): Azure Media Services Endpoint Path.
body (str): Azure Media Services Content Body.
access_token (str): A valid Azure authentication token.
rformat (str): A re... | 3.646058 | 2.549477 | 1.43012 |
'''Do a AMS PATCH request and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
path (str): Azure Media Services Endpoint Path.
body (str): Azure Media Services Content Body.
access_token (str): A valid Azure authentication token.
Returns:
HT... | def do_ams_patch(endpoint, path, body, access_token) | Do a AMS PATCH request and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
path (str): Azure Media Services Endpoint Path.
body (str): Azure Media Services Content Body.
access_token (str): A valid Azure authentication token.
Returns:
HTTP resp... | 4.168906 | 2.889099 | 1.442978 |
'''Do a AMS DELETE request and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
path (str): Azure Media Services Endpoint Path.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body.
'''
headers = {"DataSer... | def do_ams_delete(endpoint, path, access_token) | Do a AMS DELETE request and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
path (str): Azure Media Services Endpoint Path.
access_token (str): A valid Azure authentication token.
Returns:
HTTP response. JSON body. | 4.570796 | 3.261124 | 1.401601 |
'''Do a PUT request to the Azure Storage API and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
body (str): Azure Media Services Content Body.
content_length (str): Content_length.
Returns:
HTTP response. JSON body.
'''
headers = {"Accept"... | def do_ams_sto_put(endpoint, body, content_length) | Do a PUT request to the Azure Storage API and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
body (str): Azure Media Services Content Body.
content_length (str): Content_length.
Returns:
HTTP response. JSON body. | 3.815176 | 2.181629 | 1.748774 |
'''Do an AMS GET request to retrieve the Final AMS Endpoint and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
access_token (str): A valid Azure authentication token.
flag (str): A Flag to follow the redirect or not.
Returns:
HTTP response. JSON b... | def do_ams_get_url(endpoint, access_token, flag=True) | Do an AMS GET request to retrieve the Final AMS Endpoint and return JSON.
Args:
endpoint (str): Azure Media Services Initial Endpoint.
access_token (str): A valid Azure authentication token.
flag (str): A Flag to follow the redirect or not.
Returns:
HTTP response. JSON body. | 4.457179 | 2.371134 | 1.879767 |
'''report error for bad update'''
print("Error " + operation)
sys.exit('Return code: ' + str(ret.status_code) + ' Error: ' + ret.text) | def handle_bad_update(operation, ret) | report error for bad update | 7.597074 | 6.456917 | 1.176579 |
'''Extract a multi-line string from a string array, up to a specified end marker.
Args:
end_mark (str): The end mark string to match for.
current_str (str): The first line of the string array.
str_array (list): An array of strings (lines).
line_num (int): The... | def extract_code(end_mark, current_str, str_array, line_num) | Extract a multi-line string from a string array, up to a specified end marker.
Args:
end_mark (str): The end mark string to match for.
current_str (str): The first line of the string array.
str_array (list): An array of strings (lines).
line_num (int): The curren... | 3.039487 | 1.712417 | 1.774968 |
'''Process a Python source file with Google style docstring comments.
Reads file header comment, function definitions, function docstrings.
Returns dictionary encapsulation for subsequent writing.
Args:
pyfile_name (str): file name to read.
Returns:
Dictionary object containing su... | def process_file(pyfile_name) | Process a Python source file with Google style docstring comments.
Reads file header comment, function definitions, function docstrings.
Returns dictionary encapsulation for subsequent writing.
Args:
pyfile_name (str): file name to read.
Returns:
Dictionary object containing summary c... | 3.818662 | 2.630762 | 1.451542 |
'''Create a markdown format documentation file.
Args:
meta_file (dict): Dictionary with documentation metadata.
outfile_name (str): Markdown file to write to.
'''
# Markdown title line
doc_str = '# ' + meta_file['header'] + '\n'
doc_str += 'Generated by [py2md](https://github.c... | def process_output(meta_file, outfile_name, code_links) | Create a markdown format documentation file.
Args:
meta_file (dict): Dictionary with documentation metadata.
outfile_name (str): Markdown file to write to. | 2.703716 | 2.486489 | 1.087363 |
'''Main routine.'''
# validate command line arguments
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--sourcedir', '-s', required=True, action='store',
help='Source folder containing python files.')
arg_parser.add_argument('--docfile', '-o', required=Tru... | def main() | Main routine. | 2.699793 | 2.695776 | 1.00149 |
'''Create a new container service - include app_id and app_secret if using Kubernetes.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
service_name (str): Name of contain... | def create_container_service(access_token, subscription_id, resource_group, service_name, \
agent_count, agent_vm_size, agent_dns, master_dns, admin_user, location, public_key=None,\
master_count=3, orchestrator='DCOS', app_id=None, app_secret=None, admin_password=None, \
ostype='Linux') | Create a new container service - include app_id and app_secret if using Kubernetes.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
service_name (str): Name of container serv... | 2.207121 | 1.579843 | 1.397051 |
'''Delete a named container.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
service_name (str): Name of container service.
Returns:
HTTP response.
'''
... | def delete_container_service(access_token, subscription_id, resource_group, service_name) | Delete a named container.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
service_name (str): Name of container service.
Returns:
HTTP response. | 2.49019 | 2.084784 | 1.194459 |
'''Get details about an Azure Container Server
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
service_name (str): Name of container service.
Returns:
HTTP r... | def get_container_service(access_token, subscription_id, resource_group, service_name) | Get details about an Azure Container Server
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
service_name (str): Name of container service.
Returns:
HTTP response... | 2.774105 | 1.992517 | 1.392262 |
'''List the container services in a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
Returns:
HTTP response. JSON model.
'''
endpoint = ''.join... | def list_container_services(access_token, subscription_id, resource_group) | List the container services in a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
Returns:
HTTP response. JSON model. | 2.912062 | 2.371639 | 1.227869 |
'''List the container services in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON model.
'''
endpoint = ''.join([get_rm_endpoint(),
'/subscription... | def list_container_services_sub(access_token, subscription_id) | List the container services in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON model. | 3.545426 | 2.848303 | 1.24475 |
'''Create a new storage account in the named resource group, with the named location.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
account_name (str): Name of the new storage ... | def create_storage_account(access_token, subscription_id, rgname, account_name, location,
storage_type='Standard_LRS') | Create a new storage account in the named resource group, with the named location.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
account_name (str): Name of the new storage account... | 2.725644 | 1.63984 | 1.662141 |
'''Delete a storage account in the specified resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
account_name (str): Name of the new storage account.
Returns:
... | def delete_storage_account(access_token, subscription_id, rgname, account_name) | Delete a storage account in the specified resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
account_name (str): Name of the new storage account.
Returns:
H... | 2.290054 | 1.965839 | 1.164924 |
'''Get the properties for the named storage account.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
account_name (str): Name of the new storage account.
Returns:
HT... | def get_storage_account(access_token, subscription_id, rgname, account_name) | Get the properties for the named storage account.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
account_name (str): Name of the new storage account.
Returns:
HTTP resp... | 2.503962 | 1.840644 | 1.360372 |
'''Get the access keys for the specified storage account.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
account_name (str): Name of the new storage account.
Returns:
... | def get_storage_account_keys(access_token, subscription_id, rgname, account_name) | Get the access keys for the specified storage account.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
account_name (str): Name of the new storage account.
Returns:
HTTP... | 2.578878 | 1.984497 | 1.299512 |
'''Returns storage usage and quota information for the specified subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of storage account usage.
'''
endpoint = ''.join([get... | def get_storage_usage(access_token, subscription_id, location) | Returns storage usage and quota information for the specified subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of storage account usage. | 3.436211 | 2.341439 | 1.467564 |
'''List the storage accounts in the specified resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
Returns:
HTTP response. JSON body list of storage accounts.
... | def list_storage_accounts_rg(access_token, subscription_id, rgname) | List the storage accounts in the specified resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
Returns:
HTTP response. JSON body list of storage accounts. | 2.576079 | 2.090203 | 1.232454 |
'''List the storage accounts in the specified subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body list of storage accounts.
'''
endpoint = ''.join([get_rm_endpoint(),
... | def list_storage_accounts_sub(access_token, subscription_id) | List the storage accounts in the specified subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body list of storage accounts. | 2.998379 | 2.393229 | 1.252859 |
'''Main routine.'''
# validate command line arguments
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--add', '-a', action='store_true', default=False, help='add a key vault')
arg_parser.add_argument('--delete', '-d', action='store_true', default=False, help='delete a key vault')
... | def main() | Main routine. | 2.263692 | 2.261711 | 1.000876 |
'''get resource group name from the id string'''
rgidx = idstr.find('resourceGroups/')
providx = idstr.find('/providers/')
return idstr[rgidx + 15:providx] | def rgfromid(idstr) | get resource group name from the id string | 4.711065 | 4.220927 | 1.116121 |
'''main routine'''
# Load Azure app defaults
try:
with open('azurermconfig.json') as config_file:
config_data = json.load(config_file)
except FileNotFoundError:
sys.exit('Error: Expecting azurermconfig.json in current folder')
tenant_id = config_data['tenantId']
app_... | def main() | main routine | 2.443724 | 2.452374 | 0.996473 |
'''Main routine.'''
# process arguments
if len(sys.argv) < 3:
usage()
rgname = sys.argv[1]
vmss = sys.argv[2]
# Load Azure app defaults
try:
with open('azurermconfig.json') as config_file:
config_data = json.load(config_file)
except FileNotFoundError:
... | def main() | Main routine. | 2.017092 | 2.017042 | 1.000025 |
'''Check media service name availability.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
msname (str): media service name.
Returns:
HTTP response.
'''
endpoint = ''.join([get_rm_endpoint(),
... | def check_media_service_name_availability(access_token, subscription_id, msname) | Check media service name availability.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
msname (str): media service name.
Returns:
HTTP response. | 2.89135 | 2.622309 | 1.102597 |
'''Create a media service in a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
location (str): Azure data center location. E.g. westus.
stoname (str): Azu... | def create_media_service_rg(access_token, subscription_id, rgname, location, stoname, msname) | Create a media service in a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
location (str): Azure data center location. E.g. westus.
stoname (str): Azure stor... | 2.257978 | 1.945683 | 1.160506 |
'''Delete a media service.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
msname (str): Media service name.
Returns:
HTTP response.
'''
endpoint = ''.join([... | def delete_media_service_rg(access_token, subscription_id, rgname, msname) | Delete a media service.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
msname (str): Media service name.
Returns:
HTTP response. | 2.248359 | 2.064215 | 1.089208 |
'''list the media endpoint keys in a media service
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
msname (str): Media service name.
Returns:
HTTP response. JSON bod... | def list_media_endpoint_keys(access_token, subscription_id, rgname, msname) | list the media endpoint keys in a media service
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
msname (str): Media service name.
Returns:
HTTP response. JSON body. | 2.61921 | 2.183841 | 1.199359 |
'''List the media services in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body.
'''
endpoint = ''.join([get_rm_endpoint(),
'/subscriptions/',... | def list_media_services(access_token, subscription_id) | List the media services in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body. | 3.038769 | 2.560761 | 1.186666 |
'''List the media services in a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
Returns:
HTTP response. JSON body.
'''
endpoint = ''.join([get_rm_end... | def list_media_services_rg(access_token, subscription_id, rgname) | List the media services in a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rgname (str): Azure resource group name.
Returns:
HTTP response. JSON body. | 2.524836 | 2.1796 | 1.158394 |
'''Get Media Services Authentication Token.
Args:
accountname (str): Azure Media Services account name.
accountkey (str): Azure Media Services Key.
Returns:
HTTP response. JSON body.
'''
accountkey_encoded = urllib.parse.quote(accountkey, safe='')
body = "grant_type=cli... | def get_ams_access_token(accountname, accountkey) | Get Media Services Authentication Token.
Args:
accountname (str): Azure Media Services account name.
accountkey (str): Azure Media Services Key.
Returns:
HTTP response. JSON body. | 4.006927 | 2.98786 | 1.341069 |
'''Create Media Service Asset.
Args:
access_token (str): A valid Azure authentication token.
name (str): Media Service Asset Name.
options (str): Media Service Options.
Returns:
HTTP response. JSON body.
'''
path = '/Assets'
endpoint = ''.join([ams_rest_endpoint... | def create_media_asset(access_token, name, options="0") | Create Media Service Asset.
Args:
access_token (str): A valid Azure authentication token.
name (str): Media Service Asset Name.
options (str): Media Service Options.
Returns:
HTTP response. JSON body. | 3.859087 | 2.791196 | 1.382592 |
'''Create Media Service Asset File.
Args:
access_token (str): A valid Azure authentication token.
parent_asset_id (str): Media Service Parent Asset ID.
name (str): Media Service Asset Name.
is_primary (str): Media Service Primary Flag.
is_encrypted (str): Media Service E... | def create_media_assetfile(access_token, parent_asset_id, name, is_primary="false", \
is_encrypted="false", encryption_scheme="None", encryptionkey_id="None") | Create Media Service Asset File.
Args:
access_token (str): A valid Azure authentication token.
parent_asset_id (str): Media Service Parent Asset ID.
name (str): Media Service Asset Name.
is_primary (str): Media Service Primary Flag.
is_encrypted (str): Media Service Encrypti... | 2.029035 | 1.746653 | 1.161671 |
'''Create Media Service SAS Locator.
Args:
access_token (str): A valid Azure authentication token.
asset_id (str): Media Service Asset ID.
accesspolicy_id (str): Media Service Access Policy ID.
Returns:
HTTP response. JSON body.
'''
path = '/Locators'
endpoint =... | def create_sas_locator(access_token, asset_id, accesspolicy_id) | Create Media Service SAS Locator.
Args:
access_token (str): A valid Azure authentication token.
asset_id (str): Media Service Asset ID.
accesspolicy_id (str): Media Service Access Policy ID.
Returns:
HTTP response. JSON body. | 3.307904 | 2.601484 | 1.271545 |
'''Create Media Service Asset Delivery Policy.
Args:
access_token (str): A valid Azure authentication token.
ams_account (str): Media Service Account.
Returns:
HTTP response. JSON body.
'''
path = '/AssetDeliveryPolicies'
endpoint = ''.join([ams_rest_endpoint, path])
... | def create_asset_delivery_policy(access_token, ams_account, key_delivery_url) | Create Media Service Asset Delivery Policy.
Args:
access_token (str): A valid Azure authentication token.
ams_account (str): Media Service Account.
Returns:
HTTP response. JSON body. | 4.434733 | 3.502735 | 1.266077 |
'''Create Media Service Content Key Authorization Policy.
Args:
access_token (str): A valid Azure authentication token.
content (str): Content Payload.
Returns:
HTTP response. JSON body.
'''
path = '/ContentKeyAuthorizationPolicies'
endpoint = ''.join([ams_rest_endpoint... | def create_contentkey_authorization_policy(access_token, content) | Create Media Service Content Key Authorization Policy.
Args:
access_token (str): A valid Azure authentication token.
content (str): Content Payload.
Returns:
HTTP response. JSON body. | 5.503022 | 3.503402 | 1.570765 |
'''Create Media Service Content Key Authorization Policy Options.
Args:
access_token (str): A valid Azure authentication token.
key_delivery_type (str): A Media Service Content Key Authorization Policy Delivery Type.
name (str): A Media Service Contenty Key Authorization Policy Name.
... | def create_contentkey_authorization_policy_options(access_token, key_delivery_type="2", \
name="HLS Open Authorization Policy", key_restriction_type="0") | Create Media Service Content Key Authorization Policy Options.
Args:
access_token (str): A valid Azure authentication token.
key_delivery_type (str): A Media Service Content Key Authorization Policy Delivery Type.
name (str): A Media Service Contenty Key Authorization Policy Name.
k... | 4.46339 | 3.022276 | 1.476831 |
'''Create Media Service OnDemand Streaming Locator.
Args:
access_token (str): A valid Azure authentication token.
encoded_asset_id (str): A Media Service Encoded Asset ID.
pid (str): A Media Service Encoded PID.
starttime (str): A Media Service Starttime.
Returns:
H... | def create_ondemand_streaming_locator(access_token, encoded_asset_id, pid, starttime=None) | Create Media Service OnDemand Streaming Locator.
Args:
access_token (str): A valid Azure authentication token.
encoded_asset_id (str): A Media Service Encoded Asset ID.
pid (str): A Media Service Encoded PID.
starttime (str): A Media Service Starttime.
Returns:
HTTP res... | 2.870462 | 2.285549 | 1.255918 |
'''Create Media Service Asset Access Policy.
Args:
access_token (str): A valid Azure authentication token.
name (str): A Media Service Asset Access Policy Name.
duration (str): A Media Service duration.
permission (str): A Media Service permission.
Returns:
HTTP res... | def create_asset_accesspolicy(access_token, name, duration, permission="1") | Create Media Service Asset Access Policy.
Args:
access_token (str): A valid Azure authentication token.
name (str): A Media Service Asset Access Policy Name.
duration (str): A Media Service duration.
permission (str): A Media Service permission.
Returns:
HTTP response. ... | 3.370623 | 2.434806 | 1.38435 |
'''Create Media Service Streaming Endpoint.
Args:
access_token (str): A valid Azure authentication token.
name (str): A Media Service Streaming Endpoint Name.
description (str): A Media Service Streaming Endpoint Description.
scale_units (str): A Media Service Scale Units Number... | def create_streaming_endpoint(access_token, name, description="New Streaming Endpoint", \
scale_units="1") | Create Media Service Streaming Endpoint.
Args:
access_token (str): A valid Azure authentication token.
name (str): A Media Service Streaming Endpoint Name.
description (str): A Media Service Streaming Endpoint Description.
scale_units (str): A Media Service Scale Units Number.
... | 2.737487 | 2.407971 | 1.136844 |
'''Scale Media Service Streaming Endpoint.
Args:
access_token (str): A valid Azure authentication token.
streaming_endpoint_id (str): A Media Service Streaming Endpoint ID.
scale_units (str): A Media Service Scale Units Number.
Returns:
HTTP response. JSON body.
'''
... | def scale_streaming_endpoint(access_token, streaming_endpoint_id, scale_units) | Scale Media Service Streaming Endpoint.
Args:
access_token (str): A valid Azure authentication token.
streaming_endpoint_id (str): A Media Service Streaming Endpoint ID.
scale_units (str): A Media Service Scale Units Number.
Returns:
HTTP response. JSON body. | 3.356834 | 2.608042 | 1.287109 |
'''Link Media Service Asset and Content Key.
Args:
access_token (str): A valid Azure authentication token.
asset_id (str): A Media Service Asset ID.
encryption_id (str): A Media Service Encryption ID.
ams_redirected_rest_endpoint (str): A Media Service Redirected Endpoint.
... | def link_asset_content_key(access_token, asset_id, encryptionkey_id, ams_redirected_rest_endpoint) | Link Media Service Asset and Content Key.
Args:
access_token (str): A valid Azure authentication token.
asset_id (str): A Media Service Asset ID.
encryption_id (str): A Media Service Encryption ID.
ams_redirected_rest_endpoint (str): A Media Service Redirected Endpoint.
Returns... | 3.277396 | 2.507756 | 1.306904 |
'''Link Media Service Content Key Authorization Policy.
Args:
access_token (str): A valid Azure authentication token.
ckap_id (str): A Media Service Asset Content Key Authorization Policy ID.
options_id (str): A Media Service Content Key Authorization Policy Options .
ams_redire... | def link_contentkey_authorization_policy(access_token, ckap_id, options_id, \
ams_redirected_rest_endpoint) | Link Media Service Content Key Authorization Policy.
Args:
access_token (str): A valid Azure authentication token.
ckap_id (str): A Media Service Asset Content Key Authorization Policy ID.
options_id (str): A Media Service Content Key Authorization Policy Options .
ams_redirected_re... | 3.702201 | 2.745908 | 1.348261 |
'''Add Media Service Authorization Policy.
Args:
access_token (str): A valid Azure authentication token.
ck_id (str): A Media Service Asset Content Key ID.
options_id (str): A Media Service OID.
Returns:
HTTP response. JSON body.
'''
path = '/ContentKeys'
body =... | def add_authorization_policy(access_token, ck_id, oid) | Add Media Service Authorization Policy.
Args:
access_token (str): A valid Azure authentication token.
ck_id (str): A Media Service Asset Content Key ID.
options_id (str): A Media Service OID.
Returns:
HTTP response. JSON body. | 5.660378 | 2.599818 | 2.177221 |
'''Update Media Service Asset File.
Args:
access_token (str): A valid Azure authentication token.
parent_asset_id (str): A Media Service Asset Parent Asset ID.
asset_id (str): A Media Service Asset Asset ID.
content_length (str): A Media Service Asset Content Length.
nam... | def update_media_assetfile(access_token, parent_asset_id, asset_id, content_length, name) | Update Media Service Asset File.
Args:
access_token (str): A valid Azure authentication token.
parent_asset_id (str): A Media Service Asset Parent Asset ID.
asset_id (str): A Media Service Asset Asset ID.
content_length (str): A Media Service Asset Content Length.
name (str)... | 2.783747 | 2.228632 | 1.249083 |
'''Get Media Services Key Delivery URL.
Args:
access_token (str): A valid Azure authentication token.
ck_id (str): A Media Service Content Key ID.
key_type (str): A Media Service key Type.
Returns:
HTTP response. JSON body.
'''
path = '/ContentKeys'
full_path = ... | def get_key_delivery_url(access_token, ck_id, key_type) | Get Media Services Key Delivery URL.
Args:
access_token (str): A valid Azure authentication token.
ck_id (str): A Media Service Content Key ID.
key_type (str): A Media Service key Type.
Returns:
HTTP response. JSON body. | 4.172739 | 2.857602 | 1.460224 |
'''Get Media Service Encode Mezanine Asset.
Args:
access_token (str): A valid Azure authentication token.
processor_id (str): A Media Service Processor ID.
asset_id (str): A Media Service Asset ID.
output_assetname (str): A Media Service Asset Name.
json_profile (str): A... | def encode_mezzanine_asset(access_token, processor_id, asset_id, output_assetname, json_profile) | Get Media Service Encode Mezanine Asset.
Args:
access_token (str): A valid Azure authentication token.
processor_id (str): A Media Service Processor ID.
asset_id (str): A Media Service Asset ID.
output_assetname (str): A Media Service Asset Name.
json_profile (str): A Media ... | 3.660153 | 3.058254 | 1.196812 |
'''Helper Function to add strings to a URL path.
Args:
access_token (str): A valid Azure authentication token.
ck_id (str): A CK ID.
path (str): A URL Path.
body (str): A Body.
Returns:
HTTP response. JSON body.
'''
full_path = ''.join([path, "('", ck_id, "'... | def helper_add(access_token, ck_id, path, body) | Helper Function to add strings to a URL path.
Args:
access_token (str): A valid Azure authentication token.
ck_id (str): A CK ID.
path (str): A URL Path.
body (str): A Body.
Returns:
HTTP response. JSON body. | 4.771708 | 3.028078 | 1.575821 |
'''Helper Function to list a URL path.
Args:
access_token (str): A valid Azure authentication token.
oid (str): An OID.
path (str): A URL Path.
Returns:
HTTP response. JSON body.
'''
if oid != "":
path = ''.join([path, "('", oid, "')"])
endpoint = ''.joi... | def helper_list(access_token, oid, path) | Helper Function to list a URL path.
Args:
access_token (str): A valid Azure authentication token.
oid (str): An OID.
path (str): A URL Path.
Returns:
HTTP response. JSON body. | 5.051048 | 2.952135 | 1.710982 |
'''Helper Function to delete a Object at a URL path.
Args:
access_token (str): A valid Azure authentication token.
oid (str): An OID.
path (str): A URL Path.
Returns:
HTTP response. JSON body.
'''
full_path = ''.join([path, "('", oid, "')"])
full_path_encoded = ... | def helper_delete(access_token, oid, path) | Helper Function to delete a Object at a URL path.
Args:
access_token (str): A valid Azure authentication token.
oid (str): An OID.
path (str): A URL Path.
Returns:
HTTP response. JSON body. | 4.273167 | 2.618536 | 1.631891 |
'''AUX Function to translate the (numeric) state of a Job.
Args:
nr (int): A valid number to translate.
Returns:
HTTP response. JSON body.
'''
code_description = ""
if code == "0":
code_description = "Queued"
if code == "1":
code_description = "Scheduled"
... | def translate_job_state(code) | AUX Function to translate the (numeric) state of a Job.
Args:
nr (int): A valid number to translate.
Returns:
HTTP response. JSON body. | 3.263705 | 1.88148 | 1.734648 |
'''List all operations involved in a given deployment.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rg_name (str): Azure resource group name.
Returns:
HTTP response. JSON body.
'''
endpoint = ''.join([ge... | def list_deployment_operations(access_token, subscription_id, rg_name, deployment_name) | List all operations involved in a given deployment.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
rg_name (str): Azure resource group name.
Returns:
HTTP response. JSON body. | 2.674413 | 2.037684 | 1.312477 |
'''Create a load balancer with inbound NAT pools.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
lb_name (str): Name of the new load balancer.
public_ip_id (str)... | def create_lb_with_nat_pool(access_token, subscription_id, resource_group, lb_name, public_ip_id,
fe_start_port, fe_end_port, backend_port, location) | Create a load balancer with inbound NAT pools.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
lb_name (str): Name of the new load balancer.
public_ip_id (str): Publi... | 2.195898 | 1.813532 | 1.210841 |
'''Create a network interface with an associated public ip address.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nic_name (str): Name of the new NIC.
public_ip... | def create_nic(access_token, subscription_id, resource_group, nic_name, public_ip_id, subnet_id,
location, nsg_id=None) | Create a network interface with an associated public ip address.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nic_name (str): Name of the new NIC.
public_ip_id (st... | 2.217839 | 1.699425 | 1.305053 |
'''Create network security group (use create_nsg_rule() to add rules to it).
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nsg_name (str): Name of the new NSG.
... | def create_nsg(access_token, subscription_id, resource_group, nsg_name, location) | Create network security group (use create_nsg_rule() to add rules to it).
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nsg_name (str): Name of the new NSG.
locatio... | 2.555542 | 1.717314 | 1.488104 |
'''Create network security group rule.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nsg_name (str): Name of the Network Security Group.
nsg_rule_name (str): Na... | def create_nsg_rule(access_token, subscription_id, resource_group, nsg_name, nsg_rule_name,
description, protocol='Tcp', source_range='*', destination_range='*',
source_prefix='*', destination_prefix='*', access='Allow', priority=100,
direction='Inbound') | Create network security group rule.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nsg_name (str): Name of the Network Security Group.
nsg_rule_name (str): Name of t... | 2.088711 | 1.433322 | 1.457252 |
'''Create a public ip address.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
public_ip_name (str): Name of the new public ip address resource.
dns_label (str): ... | def create_public_ip(access_token, subscription_id, resource_group, public_ip_name, dns_label,
location) | Create a public ip address.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
public_ip_name (str): Name of the new public ip address resource.
dns_label (str): DNS lab... | 2.242872 | 1.676966 | 1.337458 |
'''Create a VNet with specified name and location. Optional subnet address prefix..
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
name (str): Name of the new VNet.
... | def create_vnet(access_token, subscription_id, resource_group, name, location,
address_prefix='10.0.0.0/16', subnet_prefix='10.0.0.0/16', nsg_id=None) | Create a VNet with specified name and location. Optional subnet address prefix..
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
name (str): Name of the new VNet.
loc... | 2.128733 | 1.517082 | 1.403176 |
'''Delete a load balancer.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
lb_name (str): Name of the load balancer.
Returns:
HTTP response.
'''
endp... | def delete_load_balancer(access_token, subscription_id, resource_group, lb_name) | Delete a load balancer.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
lb_name (str): Name of the load balancer.
Returns:
HTTP response. | 2.097383 | 1.977217 | 1.060775 |
'''Delete a network interface.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nic_name (str): Name of the NIC.
Returns:
HTTP response.
'''
endpoint ... | def delete_nic(access_token, subscription_id, resource_group, nic_name) | Delete a network interface.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nic_name (str): Name of the NIC.
Returns:
HTTP response. | 2.116684 | 1.945487 | 1.087997 |
'''Delete network security group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nsg_name (str): Name of the NSG.
Returns:
HTTP response.
'''
endpoi... | def delete_nsg(access_token, subscription_id, resource_group, nsg_name) | Delete network security group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nsg_name (str): Name of the NSG.
Returns:
HTTP response. | 2.166039 | 1.913359 | 1.132061 |
'''Delete network security group rule.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nsg_name (str): Name of the Network Security Group.
nsg_rule_name (str): Na... | def delete_nsg_rule(access_token, subscription_id, resource_group, nsg_name, nsg_rule_name) | Delete network security group rule.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nsg_name (str): Name of the Network Security Group.
nsg_rule_name (str): Name of t... | 1.96787 | 1.730457 | 1.137197 |
'''Delete a public ip addresses associated with a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
public_ip_name (str): Name of the public ip address reso... | def delete_public_ip(access_token, subscription_id, resource_group, public_ip_name) | Delete a public ip addresses associated with a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
public_ip_name (str): Name of the public ip address resource.
... | 2.26928 | 1.842129 | 1.231879 |
'''Delete a virtual network.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
name (str): Name of the VNet.
Returns:
HTTP response. VNet JSON body.
'''
... | def delete_vnet(access_token, subscription_id, resource_group, name) | Delete a virtual network.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
name (str): Name of the VNet.
Returns:
HTTP response. VNet JSON body. | 2.393671 | 1.878664 | 1.274135 |
'''Get details about a load balancer inbound NAT rule.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
lb_name (str): Name of the load balancer.
rule_name (str): ... | def get_lb_nat_rule(access_token, subscription_id, resource_group, lb_name, rule_name) | Get details about a load balancer inbound NAT rule.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
lb_name (str): Name of the load balancer.
rule_name (str): Name of... | 2.181256 | 1.749252 | 1.246965 |
'''List network usage and limits for a location.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
location (str): Azure data center location. E.g. westus.
Returns:
HTTP response. JSON body of network usage.
'''
... | def get_network_usage(access_token, subscription_id, location) | List network usage and limits for a location.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
location (str): Azure data center location. E.g. westus.
Returns:
HTTP response. JSON body of network usage. | 3.029631 | 2.145551 | 1.412053 |
'''Get details about a network interface.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nic_name (str): Name of the NIC.
Returns:
HTTP response. NIC JSON b... | def get_nic(access_token, subscription_id, resource_group, nic_name) | Get details about a network interface.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
nic_name (str): Name of the NIC.
Returns:
HTTP response. NIC JSON body. | 2.313424 | 1.840823 | 1.256733 |
'''Get details about the named public ip address.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
public_ip_name (str): Name of the public ip address resource.
Retur... | def get_public_ip(access_token, subscription_id, resource_group, ip_name) | Get details about the named public ip address.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
public_ip_name (str): Name of the public ip address resource.
Returns:
... | 2.716896 | 1.876461 | 1.447883 |
'''Get details about the named virtual network.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
vnet_name (str): Name of the VNet.
Returns:
HTTP response. VN... | def get_vnet(access_token, subscription_id, resource_group, vnet_name) | Get details about the named virtual network.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
vnet_name (str): Name of the VNet.
Returns:
HTTP response. VNet JSON... | 2.416267 | 1.801069 | 1.341574 |
'''Get details about the application security groups for a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
Returns:
HTTP response. ASG JSON body.
... | def list_asgs(access_token, subscription_id, resource_group) | Get details about the application security groups for a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
Returns:
HTTP response. ASG JSON body. | 3.228041 | 2.240201 | 1.44096 |
'''Get details about the application security groups for a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. ASG JSON body.
'''
endpoint = ''.join([get_rm_endpoint(),
... | def list_asgs_all(access_token, subscription_id) | Get details about the application security groups for a resource group.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. ASG JSON body. | 3.987226 | 2.548961 | 1.564255 |
'''List the inbound NAT rules for a load balancer.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
lb_name (str): Name of the load balancer.
Returns:
HTTP re... | def list_lb_nat_rules(access_token, subscription_id, resource_group, lb_name) | List the inbound NAT rules for a load balancer.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
lb_name (str): Name of the load balancer.
Returns:
HTTP response.... | 2.422911 | 1.962223 | 1.234778 |
'''List the load balancers in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of load balancer list with properties.
'''
endpoint = ''.join([get_rm_endpoint(),
... | def list_load_balancers(access_token, subscription_id) | List the load balancers in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of load balancer list with properties. | 3.261981 | 2.383748 | 1.368425 |
'''List the network interfaces in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of NICs list with properties.
'''
endpoint = ''.join([get_rm_endpoint(),
... | def list_nics(access_token, subscription_id) | List the network interfaces in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of NICs list with properties. | 3.41891 | 2.373737 | 1.440307 |
'''List all network security groups in a subscription.
Args:
access_token (str): a valid Azure Authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of all network security groups in a subscription.
'''
endpoint = ''.join([... | def list_nsgs_all(access_token, subscription_id) | List all network security groups in a subscription.
Args:
access_token (str): a valid Azure Authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of all network security groups in a subscription. | 4.311538 | 2.713025 | 1.5892 |
'''List the VNETs in a subscription .
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of VNets list with properties.
'''
endpoint = ''.join([get_rm_endpoint(),
... | def list_vnets(access_token, subscription_id) | List the VNETs in a subscription .
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of VNets list with properties. | 3.975682 | 2.367407 | 1.67934 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.