_id stringlengths 2 7 | title stringlengths 1 88 | partition stringclasses 3
values | text stringlengths 75 19.8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q6500 | OpenTok.stop_broadcast | train | def stop_broadcast(self, broadcast_id):
"""
Use this method to stop a live broadcast of an OpenTok session
:param String broadcast_id: The ID of the broadcast you want to stop
:rtype A Broadcast object, which contains information of the broadcast: id, sessionId
projectId, creat... | python | {
"resource": ""
} |
q6501 | OpenTok.get_broadcast | train | def get_broadcast(self, broadcast_id):
"""
Use this method to get details on a broadcast that is in-progress.
:param String broadcast_id: The ID of the broadcast you want to stop
:rtype A Broadcast object, which contains information of the broadcast: id, sessionId
projectId, cr... | python | {
"resource": ""
} |
q6502 | OpenTok.set_broadcast_layout | train | def set_broadcast_layout(self, broadcast_id, layout_type, stylesheet=None):
"""
Use this method to change the layout type of a live streaming broadcast
:param String broadcast_id: The ID of the broadcast that will be updated
:param String layout_type: The layout type for the broadcast.... | python | {
"resource": ""
} |
q6503 | Instapaper.login | train | def login(self, username, password):
'''Authenticate using XAuth variant of OAuth.
:param str username: Username or email address for the relevant account
:param str password: Password for the account
'''
response = self.request(
ACCESS_TOKEN,
{
... | python | {
"resource": ""
} |
q6504 | Instapaper.request | train | def request(self, path, params=None, returns_json=True,
method='POST', api_version=API_VERSION):
'''Process a request using the OAuth client's request method.
:param str path: Path fragment to the API endpoint, e.g. "resource/ID"
:param dict params: Parameters to pass to request... | python | {
"resource": ""
} |
q6505 | Instapaper.get_bookmarks | train | def get_bookmarks(self, folder='unread', limit=25, have=None):
"""Return list of user's bookmarks.
:param str folder: Optional. Possible values are unread (default),
starred, archive, or a folder_id value.
:param int limit: Optional. A number between 1 and 500, default 25.
:... | python | {
"resource": ""
} |
q6506 | Instapaper.get_folders | train | def get_folders(self):
"""Return list of user's folders.
:rtype: list
"""
path = 'folders/list'
response = self.request(path)
items = response['data']
folders = []
for item in items:
if item.get('type') == 'error':
raise Except... | python | {
"resource": ""
} |
q6507 | InstapaperObject.add | train | def add(self):
'''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:
... | python | {
"resource": ""
} |
q6508 | InstapaperObject._simple_action | train | 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
'''
if not action:
raise Exception('No simple a... | python | {
"resource": ""
} |
q6509 | Bookmark.get_highlights | train | def get_highlights(self):
'''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 = ... | python | {
"resource": ""
} |
q6510 | Sender.build_message | train | def build_message(self, metric, value, timestamp, tags={}):
"""Build a Graphite message to send and return it as a byte string."""
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)):
... | python | {
"resource": ""
} |
q6511 | get_rg_from_id | train | def get_rg_from_id(vmss_id):
'''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 | python | {
"resource": ""
} |
q6512 | get_user_agent | train | def get_user_agent():
'''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__,... | python | {
"resource": ""
} |
q6513 | do_get_next | train | 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.
'''
he... | python | {
"resource": ""
} |
q6514 | do_patch | train | 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 re... | python | {
"resource": ""
} |
q6515 | do_post | train | 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 respo... | python | {
"resource": ""
} |
q6516 | do_put | train | 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... | python | {
"resource": ""
} |
q6517 | handle_bad_update | train | def handle_bad_update(operation, ret):
'''report error for bad update'''
print("Error " + operation)
sys.exit('Return code: ' + str(ret.status_code) + ' Error: ' + ret.text) | python | {
"resource": ""
} |
q6518 | extract_code | train | 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)... | python | {
"resource": ""
} |
q6519 | process_output | train | 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.
'''
# Markdown title line
doc_str = '# ' + meta_file['header'] + '... | python | {
"resource": ""
} |
q6520 | create_container_service | train | 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 ne... | python | {
"resource": ""
} |
q6521 | delete_container_service | train | 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.
se... | python | {
"resource": ""
} |
q6522 | get_container_service | train | 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 n... | python | {
"resource": ""
} |
q6523 | list_container_services | train | 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.
... | python | {
"resource": ""
} |
q6524 | list_container_services_sub | train | 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.
'''
endpoint = ''... | python | {
"resource": ""
} |
q6525 | create_storage_account | train | 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.
... | python | {
"resource": ""
} |
q6526 | delete_storage_account | train | 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 na... | python | {
"resource": ""
} |
q6527 | get_storage_account | train | 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.
... | python | {
"resource": ""
} |
q6528 | get_storage_account_keys | train | 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 nam... | python | {
"resource": ""
} |
q6529 | get_storage_usage | train | 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 bo... | python | {
"resource": ""
} |
q6530 | list_storage_accounts_rg | train | 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.
Re... | python | {
"resource": ""
} |
q6531 | list_storage_accounts_sub | train | 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 ac... | python | {
"resource": ""
} |
q6532 | rgfromid | train | def rgfromid(idstr):
'''get resource group name from the id string'''
rgidx = idstr.find('resourceGroups/')
providx = idstr.find('/providers/')
return idstr[rgidx + 15:providx] | python | {
"resource": ""
} |
q6533 | check_media_service_name_availability | train | 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:
... | python | {
"resource": ""
} |
q6534 | create_media_service_rg | train | 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 na... | python | {
"resource": ""
} |
q6535 | delete_media_service_rg | train | 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... | python | {
"resource": ""
} |
q6536 | list_media_endpoint_keys | train | 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.
ms... | python | {
"resource": ""
} |
q6537 | list_media_services | train | 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.
'''
endpoint = ''.join([get_r... | python | {
"resource": ""
} |
q6538 | list_media_services_rg | train | 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:
H... | python | {
"resource": ""
} |
q6539 | get_ams_access_token | train | 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.
'''
accountkey_encoded = urllib.parse.qu... | python | {
"resource": ""
} |
q6540 | create_media_asset | train | 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.
'''
p... | python | {
"resource": ""
} |
q6541 | create_media_assetfile | train | 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 ... | python | {
"resource": ""
} |
q6542 | create_sas_locator | train | 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 r... | python | {
"resource": ""
} |
q6543 | create_asset_delivery_policy | train | 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.
'''
path ... | python | {
"resource": ""
} |
q6544 | create_contentkey_authorization_policy | train | 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.
'''
path = '/Content... | python | {
"resource": ""
} |
q6545 | create_contentkey_authorization_policy_options | train | 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... | python | {
"resource": ""
} |
q6546 | create_ondemand_streaming_locator | train | 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 Serv... | python | {
"resource": ""
} |
q6547 | create_asset_accesspolicy | train | 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.
... | python | {
"resource": ""
} |
q6548 | create_streaming_endpoint | train | 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... | python | {
"resource": ""
} |
q6549 | scale_streaming_endpoint | train | 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... | python | {
"resource": ""
} |
q6550 | link_asset_content_key | train | 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 E... | python | {
"resource": ""
} |
q6551 | link_contentkey_authorization_policy | train | 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 Polic... | python | {
"resource": ""
} |
q6552 | add_authorization_policy | train | 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.... | python | {
"resource": ""
} |
q6553 | update_media_assetfile | train | 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 Asse... | python | {
"resource": ""
} |
q6554 | get_key_delivery_url | train | 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... | python | {
"resource": ""
} |
q6555 | encode_mezzanine_asset | train | 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 A... | python | {
"resource": ""
} |
q6556 | helper_add | train | 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.
'... | python | {
"resource": ""
} |
q6557 | helper_list | train | 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.
'''
if oid != "":
path = ''.join([pat... | python | {
"resource": ""
} |
q6558 | helper_delete | train | 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.
'''
full_path = ''.join([path... | python | {
"resource": ""
} |
q6559 | list_deployment_operations | train | 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... | python | {
"resource": ""
} |
q6560 | create_lb_with_nat_pool | train | 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.
subs... | python | {
"resource": ""
} |
q6561 | create_nic | train | 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 ... | python | {
"resource": ""
} |
q6562 | create_nsg_rule | train | 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'):
... | python | {
"resource": ""
} |
q6563 | create_public_ip | train | 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):... | python | {
"resource": ""
} |
q6564 | create_vnet | train | 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 authenticat... | python | {
"resource": ""
} |
q6565 | delete_load_balancer | train | 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)... | python | {
"resource": ""
} |
q6566 | delete_nsg | train | 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):... | python | {
"resource": ""
} |
q6567 | delete_nsg_rule | train | 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... | python | {
"resource": ""
} |
q6568 | delete_public_ip | train | 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 ... | python | {
"resource": ""
} |
q6569 | delete_vnet | train | 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... | python | {
"resource": ""
} |
q6570 | get_lb_nat_rule | train | 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... | python | {
"resource": ""
} |
q6571 | get_network_usage | train | 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.
Retu... | python | {
"resource": ""
} |
q6572 | get_nic | train | 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 (... | python | {
"resource": ""
} |
q6573 | get_public_ip | train | 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.
... | python | {
"resource": ""
} |
q6574 | get_vnet | train | 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.
vn... | python | {
"resource": ""
} |
q6575 | list_lb_nat_rules | train | 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.
... | python | {
"resource": ""
} |
q6576 | list_load_balancers | train | 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.... | python | {
"resource": ""
} |
q6577 | list_nics | train | 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.
'''
en... | python | {
"resource": ""
} |
q6578 | list_vnets | train | 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.
'''
endpoint = '... | python | {
"resource": ""
} |
q6579 | update_load_balancer | train | def update_load_balancer(access_token, subscription_id, resource_group, lb_name, body):
'''Updates a load balancer model, i.e. PUT an updated LB body.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure ... | python | {
"resource": ""
} |
q6580 | print_region_quota | train | def print_region_quota(access_token, sub_id, region):
'''Print the Compute usage quota for a specific region'''
print(region + ':')
quota = azurerm.get_compute_usage(access_token, sub_id, region)
if SUMMARY is False:
print(json.dumps(quota, sort_keys=False, indent=2, separators=(',', ': ')))
... | python | {
"resource": ""
} |
q6581 | create_as | train | def create_as(access_token, subscription_id, resource_group, as_name,
update_domains, fault_domains, location):
'''Create availability set.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azu... | python | {
"resource": ""
} |
q6582 | create_vm | train | def create_vm(access_token, subscription_id, resource_group, vm_name, vm_size, publisher, offer,
sku, version, nic_id, location, storage_type='Standard_LRS', osdisk_name=None,
username='azure', password=None, public_key=None):
'''Create a new Azure virtual machine.
Args:
acc... | python | {
"resource": ""
} |
q6583 | create_vmss | train | def create_vmss(access_token, subscription_id, resource_group, vmss_name, vm_size, capacity,
publisher, offer, sku, version, subnet_id, location, be_pool_id=None,
lb_pool_id=None, storage_type='Standard_LRS', username='azure', password=None,
public_key=None, overprovision... | python | {
"resource": ""
} |
q6584 | delete_as | train | def delete_as(access_token, subscription_id, resource_group, as_name):
'''Delete availability set.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
as_name (str): Name of ... | python | {
"resource": ""
} |
q6585 | delete_vmss | train | def delete_vmss(access_token, subscription_id, resource_group, vmss_name):
'''Delete a virtual machine scale set.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
vmss_nam... | python | {
"resource": ""
} |
q6586 | delete_vmss_vms | train | def delete_vmss_vms(access_token, subscription_id, resource_group, vmss_name, vm_ids):
'''Delete a VM in a VM Scale Set.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
v... | python | {
"resource": ""
} |
q6587 | get_compute_usage | train | def get_compute_usage(access_token, subscription_id, location):
'''List compute 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.
Retu... | python | {
"resource": ""
} |
q6588 | get_vm | train | def get_vm(access_token, subscription_id, resource_group, vm_name):
'''Get virtual machine details.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
vm_name (str): Name of... | python | {
"resource": ""
} |
q6589 | get_vm_extension | train | def get_vm_extension(access_token, subscription_id, resource_group, vm_name, extension_name):
'''Get details about a VM extension.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.... | python | {
"resource": ""
} |
q6590 | get_vmss | train | def get_vmss(access_token, subscription_id, resource_group, vmss_name):
'''Get virtual machine scale set details.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
vmss_nam... | python | {
"resource": ""
} |
q6591 | get_vmss_vm | train | def get_vmss_vm(access_token, subscription_id, resource_group, vmss_name, instance_id):
'''Get individual VMSS VM details.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
... | python | {
"resource": ""
} |
q6592 | get_as | train | def get_as(access_token, subscription_id, resource_group, as_name):
'''Get availability set details.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
as_name (str): Name o... | python | {
"resource": ""
} |
q6593 | list_as_sub | train | def list_as_sub(access_token, subscription_id):
'''List availability sets in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of the list of availability set properties.
... | python | {
"resource": ""
} |
q6594 | list_vm_images_sub | train | def list_vm_images_sub(access_token, subscription_id):
'''List VM images in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of a list of VM images.
'''
endpoint = '... | python | {
"resource": ""
} |
q6595 | list_vms | train | def list_vms(access_token, subscription_id, resource_group):
'''List VMs 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.... | python | {
"resource": ""
} |
q6596 | list_vms_sub | train | def list_vms_sub(access_token, subscription_id):
'''List VMs in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of a list of VM model views.
'''
endpoint = ''.join(... | python | {
"resource": ""
} |
q6597 | list_vmss | train | def list_vmss(access_token, subscription_id, resource_group):
'''List VM Scale Sets 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:
HTT... | python | {
"resource": ""
} |
q6598 | list_vmss_skus | train | def list_vmss_skus(access_token, subscription_id, resource_group, vmss_name):
'''List the VM skus available for a VM Scale Set.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
resource_group (str): Azure resource group name.
... | python | {
"resource": ""
} |
q6599 | list_vmss_sub | train | def list_vmss_sub(access_token, subscription_id):
'''List VM Scale Sets in a subscription.
Args:
access_token (str): A valid Azure authentication token.
subscription_id (str): Azure subscription id.
Returns:
HTTP response. JSON body of VM scale sets.
'''
endpoint = ''.join(... | python | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.