repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
gbowerman/azurerm | examples/vip_swap.py | main | def main():
'''main routine'''
# create parser
arg_parser = argparse.ArgumentParser()
# arguments: resource group lb name 1, 2
arg_parser.add_argument('--resourcegroup', '-g', required=True,
dest='resource_group', action='store', help='Resource group name')
arg_parse... | python | def main():
'''main routine'''
# create parser
arg_parser = argparse.ArgumentParser()
# arguments: resource group lb name 1, 2
arg_parser.add_argument('--resourcegroup', '-g', required=True,
dest='resource_group', action='store', help='Resource group name')
arg_parse... | [
"def",
"main",
"(",
")",
":",
"# create parser",
"arg_parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
")",
"# arguments: resource group lb name 1, 2",
"arg_parser",
".",
"add_argument",
"(",
"'--resourcegroup'",
",",
"'-g'",
",",
"required",
"=",
"True",
",",
... | main routine | [
"main",
"routine"
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/vip_swap.py#L18-L176 |
gbowerman/azurerm | docs/py2md.py | extract_code | 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 | 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)... | [
"def",
"extract_code",
"(",
"end_mark",
",",
"current_str",
",",
"str_array",
",",
"line_num",
")",
":",
"if",
"end_mark",
"not",
"in",
"current_str",
":",
"reached_end",
"=",
"False",
"line_num",
"+=",
"1",
"while",
"reached_end",
"is",
"False",
":",
"next_... | 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... | [
"Extract",
"a",
"multi",
"-",
"line",
"string",
"from",
"a",
"string",
"array",
"up",
"to",
"a",
"specified",
"end",
"marker",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/docs/py2md.py#L7-L30 |
gbowerman/azurerm | docs/py2md.py | process_file | 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:
... | python | 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:
... | [
"def",
"process_file",
"(",
"pyfile_name",
")",
":",
"print",
"(",
"'Processing file: '",
"+",
"pyfile_name",
")",
"# load the source file",
"with",
"open",
"(",
"pyfile_name",
")",
"as",
"fpyfile",
":",
"pyfile_str",
"=",
"fpyfile",
".",
"readlines",
"(",
")",
... | 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... | [
"Process",
"a",
"Python",
"source",
"file",
"with",
"Google",
"style",
"docstring",
"comments",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/docs/py2md.py#L33-L80 |
gbowerman/azurerm | docs/py2md.py | process_output | 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 | 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'] + '... | [
"def",
"process_output",
"(",
"meta_file",
",",
"outfile_name",
",",
"code_links",
")",
":",
"# Markdown title line",
"doc_str",
"=",
"'# '",
"+",
"meta_file",
"[",
"'header'",
"]",
"+",
"'\\n'",
"doc_str",
"+=",
"'Generated by [py2md](https://github.com/gbowerman/py2md... | Create a markdown format documentation file.
Args:
meta_file (dict): Dictionary with documentation metadata.
outfile_name (str): Markdown file to write to. | [
"Create",
"a",
"markdown",
"format",
"documentation",
"file",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/docs/py2md.py#L83-L123 |
gbowerman/azurerm | docs/py2md.py | main | def main():
'''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', ... | python | def main():
'''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', ... | [
"def",
"main",
"(",
")",
":",
"# validate command line arguments",
"arg_parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
")",
"arg_parser",
".",
"add_argument",
"(",
"'--sourcedir'",
",",
"'-s'",
",",
"required",
"=",
"True",
",",
"action",
"=",
"'store'",
... | Main routine. | [
"Main",
"routine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/docs/py2md.py#L126-L162 |
gbowerman/azurerm | azurerm/acs.py | create_container_service | 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 | 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... | [
"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",
"=",
"No... | 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... | [
"Create",
"a",
"new",
"container",
"service",
"-",
"include",
"app_id",
"and",
"app_secret",
"if",
"using",
"Kubernetes",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/acs.py#L7-L61 |
gbowerman/azurerm | azurerm/acs.py | delete_container_service | 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 | 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... | [
"def",
"delete_container_service",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"service_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
... | 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. | [
"Delete",
"a",
"named",
"container",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/acs.py#L64-L81 |
gbowerman/azurerm | azurerm/acs.py | get_container_service | 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 | 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... | [
"def",
"get_container_service",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"service_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"... | 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... | [
"Get",
"details",
"about",
"an",
"Azure",
"Container",
"Server"
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/acs.py#L84-L101 |
gbowerman/azurerm | azurerm/acs.py | list_container_services | 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 | 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.
... | [
"def",
"list_container_services",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourcegroups/'",
... | 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. | [
"List",
"the",
"container",
"services",
"in",
"a",
"resource",
"group",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/acs.py#L119-L135 |
gbowerman/azurerm | azurerm/acs.py | list_container_services_sub | 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 | 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 = ''... | [
"def",
"list_container_services_sub",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.ContainerService/Contain... | 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. | [
"List",
"the",
"container",
"services",
"in",
"a",
"subscription",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/acs.py#L138-L152 |
gbowerman/azurerm | azurerm/storagerp.py | create_storage_account | 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 | 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.
... | [
"def",
"create_storage_account",
"(",
"access_token",
",",
"subscription_id",
",",
"rgname",
",",
"account_name",
",",
"location",
",",
"storage_type",
"=",
"'Standard_LRS'",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
... | 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... | [
"Create",
"a",
"new",
"storage",
"account",
"in",
"the",
"named",
"resource",
"group",
"with",
"the",
"named",
"location",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/storagerp.py#L7-L33 |
gbowerman/azurerm | azurerm/storagerp.py | delete_storage_account | 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 | 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... | [
"def",
"delete_storage_account",
"(",
"access_token",
",",
"subscription_id",
",",
"rgname",
",",
"account_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resou... | 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... | [
"Delete",
"a",
"storage",
"account",
"in",
"the",
"specified",
"resource",
"group",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/storagerp.py#L36-L53 |
gbowerman/azurerm | azurerm/storagerp.py | get_storage_account | 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 | 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.
... | [
"def",
"get_storage_account",
"(",
"access_token",
",",
"subscription_id",
",",
"rgname",
",",
"account_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resource... | 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... | [
"Get",
"the",
"properties",
"for",
"the",
"named",
"storage",
"account",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/storagerp.py#L56-L73 |
gbowerman/azurerm | azurerm/storagerp.py | get_storage_account_keys | 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 | 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... | [
"def",
"get_storage_account_keys",
"(",
"access_token",
",",
"subscription_id",
",",
"rgname",
",",
"account_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/res... | 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... | [
"Get",
"the",
"access",
"keys",
"for",
"the",
"specified",
"storage",
"account",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/storagerp.py#L76-L94 |
gbowerman/azurerm | azurerm/storagerp.py | get_storage_usage | 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 | 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... | [
"def",
"get_storage_usage",
"(",
"access_token",
",",
"subscription_id",
",",
"location",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Storage/locat... | 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. | [
"Returns",
"storage",
"usage",
"and",
"quota",
"information",
"for",
"the",
"specified",
"subscription",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/storagerp.py#L97-L112 |
gbowerman/azurerm | azurerm/storagerp.py | list_storage_accounts_rg | 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 | 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... | [
"def",
"list_storage_accounts_rg",
"(",
"access_token",
",",
"subscription_id",
",",
"rgname",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourcegroups/'",
",",
... | 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. | [
"List",
"the",
"storage",
"accounts",
"in",
"the",
"specified",
"resource",
"group",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/storagerp.py#L115-L131 |
gbowerman/azurerm | azurerm/storagerp.py | list_storage_accounts_sub | 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 | 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... | [
"def",
"list_storage_accounts_sub",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Storage/storageAccounts'",... | 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. | [
"List",
"the",
"storage",
"accounts",
"in",
"the",
"specified",
"subscription",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/storagerp.py#L134-L148 |
gbowerman/azurerm | examples/keyvault.py | main | def main():
'''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 ... | python | def main():
'''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 ... | [
"def",
"main",
"(",
")",
":",
"# validate command line arguments",
"arg_parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
")",
"arg_parser",
".",
"add_argument",
"(",
"'--add'",
",",
"'-a'",
",",
"action",
"=",
"'store_true'",
",",
"default",
"=",
"False",
... | Main routine. | [
"Main",
"routine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/keyvault.py#L11-L84 |
gbowerman/azurerm | examples/create_vmss.py | main | def main():
'''Main routine.'''
# validate command line arguments
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--name', '-n', required=True,
action='store', help='Name of vmss')
arg_parser.add_argument('--capacity', '-c', required=True, action='store',... | python | def main():
'''Main routine.'''
# validate command line arguments
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--name', '-n', required=True,
action='store', help='Name of vmss')
arg_parser.add_argument('--capacity', '-c', required=True, action='store',... | [
"def",
"main",
"(",
")",
":",
"# validate command line arguments",
"arg_parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
")",
"arg_parser",
".",
"add_argument",
"(",
"'--name'",
",",
"'-n'",
",",
"required",
"=",
"True",
",",
"action",
"=",
"'store'",
","... | Main routine. | [
"Main",
"routine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/create_vmss.py#L10-L110 |
gbowerman/azurerm | examples/list_storage.py | rgfromid | 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 | def rgfromid(idstr):
'''get resource group name from the id string'''
rgidx = idstr.find('resourceGroups/')
providx = idstr.find('/providers/')
return idstr[rgidx + 15:providx] | [
"def",
"rgfromid",
"(",
"idstr",
")",
":",
"rgidx",
"=",
"idstr",
".",
"find",
"(",
"'resourceGroups/'",
")",
"providx",
"=",
"idstr",
".",
"find",
"(",
"'/providers/'",
")",
"return",
"idstr",
"[",
"rgidx",
"+",
"15",
":",
"providx",
"]"
] | get resource group name from the id string | [
"get",
"resource",
"group",
"name",
"from",
"the",
"id",
"string"
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/list_storage.py#L8-L12 |
gbowerman/azurerm | examples/list_storage.py | main | def main():
'''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['tenantI... | python | def main():
'''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['tenantI... | [
"def",
"main",
"(",
")",
":",
"# Load Azure app defaults",
"try",
":",
"with",
"open",
"(",
"'azurermconfig.json'",
")",
"as",
"config_file",
":",
"config_data",
"=",
"json",
".",
"load",
"(",
"config_file",
")",
"except",
"FileNotFoundError",
":",
"sys",
".",... | main routine | [
"main",
"routine"
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/list_storage.py#L14-L41 |
gbowerman/azurerm | examples/instanceviews.py | main | def main():
'''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 FileNotFound... | python | def main():
'''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 FileNotFound... | [
"def",
"main",
"(",
")",
":",
"# process arguments",
"if",
"len",
"(",
"sys",
".",
"argv",
")",
"<",
"3",
":",
"usage",
"(",
")",
"rgname",
"=",
"sys",
".",
"argv",
"[",
"1",
"]",
"vmss",
"=",
"sys",
".",
"argv",
"[",
"2",
"]",
"# Load Azure app ... | Main routine. | [
"Main",
"routine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/instanceviews.py#L13-L40 |
gbowerman/azurerm | azurerm/amsrp.py | check_media_service_name_availability | 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 | 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:
... | [
"def",
"check_media_service_name_availability",
"(",
"access_token",
",",
"subscription_id",
",",
"msname",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/micro... | 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. | [
"Check",
"media",
"service",
"name",
"availability",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L9-L27 |
gbowerman/azurerm | azurerm/amsrp.py | create_media_service_rg | 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 | 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... | [
"def",
"create_media_service_rg",
"(",
"access_token",
",",
"subscription_id",
",",
"rgname",
",",
"location",
",",
"stoname",
",",
"msname",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
... | 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... | [
"Create",
"a",
"media",
"service",
"in",
"a",
"resource",
"group",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L30-L58 |
gbowerman/azurerm | azurerm/amsrp.py | delete_media_service_rg | 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 | 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... | [
"def",
"delete_media_service_rg",
"(",
"access_token",
",",
"subscription_id",
",",
"rgname",
",",
"msname",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGr... | 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. | [
"Delete",
"a",
"media",
"service",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L61-L78 |
gbowerman/azurerm | azurerm/amsrp.py | list_media_endpoint_keys | 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 | 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... | [
"def",
"list_media_endpoint_keys",
"(",
"access_token",
",",
"subscription_id",
",",
"rgname",
",",
"msname",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceG... | 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. | [
"list",
"the",
"media",
"endpoint",
"keys",
"in",
"a",
"media",
"service"
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L81-L99 |
gbowerman/azurerm | azurerm/amsrp.py | list_media_services | 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 | 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... | [
"def",
"list_media_services",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/microsoft.media/mediaservices?api-version=... | 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. | [
"List",
"the",
"media",
"services",
"in",
"a",
"subscription",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L102-L115 |
gbowerman/azurerm | azurerm/amsrp.py | list_media_services_rg | 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 | 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... | [
"def",
"list_media_services_rg",
"(",
"access_token",
",",
"subscription_id",
",",
"rgname",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups/'",
",",
"r... | 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. | [
"List",
"the",
"media",
"services",
"in",
"a",
"resource",
"group",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L118-L133 |
gbowerman/azurerm | azurerm/amsrp.py | get_ams_access_token | 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 | 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... | [
"def",
"get_ams_access_token",
"(",
"accountname",
",",
"accountkey",
")",
":",
"accountkey_encoded",
"=",
"urllib",
".",
"parse",
".",
"quote",
"(",
"accountkey",
",",
"safe",
"=",
"''",
")",
"body",
"=",
"\"grant_type=client_credentials&client_id=\"",
"+",
"acco... | Get Media Services Authentication Token.
Args:
accountname (str): Azure Media Services account name.
accountkey (str): Azure Media Services Key.
Returns:
HTTP response. JSON body. | [
"Get",
"Media",
"Services",
"Authentication",
"Token",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L136-L149 |
gbowerman/azurerm | azurerm/amsrp.py | create_media_asset | 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 | 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... | [
"def",
"create_media_asset",
"(",
"access_token",
",",
"name",
",",
"options",
"=",
"\"0\"",
")",
":",
"path",
"=",
"'/Assets'",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"ams_rest_endpoint",
",",
"path",
"]",
")",
"body",
"=",
"'{\"Name\": \"'",
"+",
... | 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. | [
"Create",
"Media",
"Service",
"Asset",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L404-L418 |
gbowerman/azurerm | azurerm/amsrp.py | create_media_assetfile | 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 | 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 ... | [
"def",
"create_media_assetfile",
"(",
"access_token",
",",
"parent_asset_id",
",",
"name",
",",
"is_primary",
"=",
"\"false\"",
",",
"is_encrypted",
"=",
"\"false\"",
",",
"encryption_scheme",
"=",
"\"None\"",
",",
"encryptionkey_id",
"=",
"\"None\"",
")",
":",
"p... | 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... | [
"Create",
"Media",
"Service",
"Asset",
"File",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L421-L457 |
gbowerman/azurerm | azurerm/amsrp.py | create_sas_locator | 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 | 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... | [
"def",
"create_sas_locator",
"(",
"access_token",
",",
"asset_id",
",",
"accesspolicy_id",
")",
":",
"path",
"=",
"'/Locators'",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"ams_rest_endpoint",
",",
"path",
"]",
")",
"body",
"=",
"'{ \\\n\t\t\"AccessPolicyId\"... | 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. | [
"Create",
"Media",
"Service",
"SAS",
"Locator",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L460-L478 |
gbowerman/azurerm | azurerm/amsrp.py | create_asset_delivery_policy | 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 | 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 ... | [
"def",
"create_asset_delivery_policy",
"(",
"access_token",
",",
"ams_account",
",",
"key_delivery_url",
")",
":",
"path",
"=",
"'/AssetDeliveryPolicies'",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"ams_rest_endpoint",
",",
"path",
"]",
")",
"body",
"=",
"'{... | 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. | [
"Create",
"Media",
"Service",
"Asset",
"Delivery",
"Policy",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L481-L501 |
gbowerman/azurerm | azurerm/amsrp.py | create_contentkey_authorization_policy | 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 | 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... | [
"def",
"create_contentkey_authorization_policy",
"(",
"access_token",
",",
"content",
")",
":",
"path",
"=",
"'/ContentKeyAuthorizationPolicies'",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"ams_rest_endpoint",
",",
"path",
"]",
")",
"body",
"=",
"content",
"re... | 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. | [
"Create",
"Media",
"Service",
"Content",
"Key",
"Authorization",
"Policy",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L504-L517 |
gbowerman/azurerm | azurerm/amsrp.py | create_contentkey_authorization_policy_options | 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 | 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... | [
"def",
"create_contentkey_authorization_policy_options",
"(",
"access_token",
",",
"key_delivery_type",
"=",
"\"2\"",
",",
"name",
"=",
"\"HLS Open Authorization Policy\"",
",",
"key_restriction_type",
"=",
"\"0\"",
")",
":",
"path",
"=",
"'/ContentKeyAuthorizationPolicyOptio... | 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... | [
"Create",
"Media",
"Service",
"Content",
"Key",
"Authorization",
"Policy",
"Options",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L520-L545 |
gbowerman/azurerm | azurerm/amsrp.py | create_ondemand_streaming_locator | 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 | 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... | [
"def",
"create_ondemand_streaming_locator",
"(",
"access_token",
",",
"encoded_asset_id",
",",
"pid",
",",
"starttime",
"=",
"None",
")",
":",
"path",
"=",
"'/Locators'",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"ams_rest_endpoint",
",",
"path",
"]",
")",... | 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... | [
"Create",
"Media",
"Service",
"OnDemand",
"Streaming",
"Locator",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L548-L575 |
gbowerman/azurerm | azurerm/amsrp.py | create_asset_accesspolicy | 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 | 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.
... | [
"def",
"create_asset_accesspolicy",
"(",
"access_token",
",",
"name",
",",
"duration",
",",
"permission",
"=",
"\"1\"",
")",
":",
"path",
"=",
"'/AccessPolicies'",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"ams_rest_endpoint",
",",
"path",
"]",
")",
"bod... | 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. ... | [
"Create",
"Media",
"Service",
"Asset",
"Access",
"Policy",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L578-L597 |
gbowerman/azurerm | azurerm/amsrp.py | create_streaming_endpoint | 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 | 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... | [
"def",
"create_streaming_endpoint",
"(",
"access_token",
",",
"name",
",",
"description",
"=",
"\"New Streaming Endpoint\"",
",",
"scale_units",
"=",
"\"1\"",
")",
":",
"path",
"=",
"'/StreamingEndpoints'",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"ams_rest_e... | 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.
... | [
"Create",
"Media",
"Service",
"Streaming",
"Endpoint",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L600-L629 |
gbowerman/azurerm | azurerm/amsrp.py | scale_streaming_endpoint | 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 | 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... | [
"def",
"scale_streaming_endpoint",
"(",
"access_token",
",",
"streaming_endpoint_id",
",",
"scale_units",
")",
":",
"path",
"=",
"'/StreamingEndpoints'",
"full_path",
"=",
"''",
".",
"join",
"(",
"[",
"path",
",",
"\"('\"",
",",
"streaming_endpoint_id",
",",
"\"')... | 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. | [
"Scale",
"Media",
"Service",
"Streaming",
"Endpoint",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L632-L648 |
gbowerman/azurerm | azurerm/amsrp.py | link_asset_content_key | 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 | 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... | [
"def",
"link_asset_content_key",
"(",
"access_token",
",",
"asset_id",
",",
"encryptionkey_id",
",",
"ams_redirected_rest_endpoint",
")",
":",
"path",
"=",
"'/Assets'",
"full_path",
"=",
"''",
".",
"join",
"(",
"[",
"path",
",",
"\"('\"",
",",
"asset_id",
",",
... | 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... | [
"Link",
"Media",
"Service",
"Asset",
"and",
"Content",
"Key",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L651-L669 |
gbowerman/azurerm | azurerm/amsrp.py | link_contentkey_authorization_policy | 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 | 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... | [
"def",
"link_contentkey_authorization_policy",
"(",
"access_token",
",",
"ckap_id",
",",
"options_id",
",",
"ams_redirected_rest_endpoint",
")",
":",
"path",
"=",
"'/ContentKeyAuthorizationPolicies'",
"full_path",
"=",
"''",
".",
"join",
"(",
"[",
"path",
",",
"\"('\"... | 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... | [
"Link",
"Media",
"Service",
"Content",
"Key",
"Authorization",
"Policy",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L693-L713 |
gbowerman/azurerm | azurerm/amsrp.py | add_authorization_policy | 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 | 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.... | [
"def",
"add_authorization_policy",
"(",
"access_token",
",",
"ck_id",
",",
"oid",
")",
":",
"path",
"=",
"'/ContentKeys'",
"body",
"=",
"'{\"AuthorizationPolicyId\":\"'",
"+",
"oid",
"+",
"'\"}'",
"return",
"helper_add",
"(",
"access_token",
",",
"ck_id",
",",
"... | 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. | [
"Add",
"Media",
"Service",
"Authorization",
"Policy",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L716-L729 |
gbowerman/azurerm | azurerm/amsrp.py | update_media_assetfile | 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 | 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... | [
"def",
"update_media_assetfile",
"(",
"access_token",
",",
"parent_asset_id",
",",
"asset_id",
",",
"content_length",
",",
"name",
")",
":",
"path",
"=",
"'/Files'",
"full_path",
"=",
"''",
".",
"join",
"(",
"[",
"path",
",",
"\"('\"",
",",
"asset_id",
",",
... | 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)... | [
"Update",
"Media",
"Service",
"Asset",
"File",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L732-L756 |
gbowerman/azurerm | azurerm/amsrp.py | get_key_delivery_url | 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 | 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... | [
"def",
"get_key_delivery_url",
"(",
"access_token",
",",
"ck_id",
",",
"key_type",
")",
":",
"path",
"=",
"'/ContentKeys'",
"full_path",
"=",
"''",
".",
"join",
"(",
"[",
"path",
",",
"\"('\"",
",",
"ck_id",
",",
"\"')\"",
",",
"\"/GetKeyDeliveryUrl\"",
"]",... | 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. | [
"Get",
"Media",
"Services",
"Key",
"Delivery",
"URL",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L759-L774 |
gbowerman/azurerm | azurerm/amsrp.py | encode_mezzanine_asset | 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 | 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... | [
"def",
"encode_mezzanine_asset",
"(",
"access_token",
",",
"processor_id",
",",
"asset_id",
",",
"output_assetname",
",",
"json_profile",
")",
":",
"path",
"=",
"'/Jobs'",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"ams_rest_endpoint",
",",
"path",
"]",
")"... | 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 ... | [
"Get",
"Media",
"Service",
"Encode",
"Mezanine",
"Asset",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L777-L808 |
gbowerman/azurerm | azurerm/amsrp.py | helper_add | 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 | 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.
'... | [
"def",
"helper_add",
"(",
"access_token",
",",
"ck_id",
",",
"path",
",",
"body",
")",
":",
"full_path",
"=",
"''",
".",
"join",
"(",
"[",
"path",
",",
"\"('\"",
",",
"ck_id",
",",
"\"')\"",
"]",
")",
"full_path_encoded",
"=",
"urllib",
".",
"parse",
... | 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. | [
"Helper",
"Function",
"to",
"add",
"strings",
"to",
"a",
"URL",
"path",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L844-L859 |
gbowerman/azurerm | azurerm/amsrp.py | helper_list | 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 | 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... | [
"def",
"helper_list",
"(",
"access_token",
",",
"oid",
",",
"path",
")",
":",
"if",
"oid",
"!=",
"\"\"",
":",
"path",
"=",
"''",
".",
"join",
"(",
"[",
"path",
",",
"\"('\"",
",",
"oid",
",",
"\"')\"",
"]",
")",
"endpoint",
"=",
"''",
".",
"join"... | 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. | [
"Helper",
"Function",
"to",
"list",
"a",
"URL",
"path",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L862-L876 |
gbowerman/azurerm | azurerm/amsrp.py | helper_delete | 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 | 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... | [
"def",
"helper_delete",
"(",
"access_token",
",",
"oid",
",",
"path",
")",
":",
"full_path",
"=",
"''",
".",
"join",
"(",
"[",
"path",
",",
"\"('\"",
",",
"oid",
",",
"\"')\"",
"]",
")",
"full_path_encoded",
"=",
"urllib",
".",
"parse",
".",
"quote",
... | 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. | [
"Helper",
"Function",
"to",
"delete",
"a",
"Object",
"at",
"a",
"URL",
"path",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L879-L893 |
gbowerman/azurerm | azurerm/amsrp.py | translate_job_state | 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.
'''
code_description = ""
if code == "0":
code_description = "Queued"
if code == "1":
co... | python | 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.
'''
code_description = ""
if code == "0":
code_description = "Queued"
if code == "1":
co... | [
"def",
"translate_job_state",
"(",
"code",
")",
":",
"code_description",
"=",
"\"\"",
"if",
"code",
"==",
"\"0\"",
":",
"code_description",
"=",
"\"Queued\"",
"if",
"code",
"==",
"\"1\"",
":",
"code_description",
"=",
"\"Scheduled\"",
"if",
"code",
"==",
"\"2\... | AUX Function to translate the (numeric) state of a Job.
Args:
nr (int): A valid number to translate.
Returns:
HTTP response. JSON body. | [
"AUX",
"Function",
"to",
"translate",
"the",
"(",
"numeric",
")",
"state",
"of",
"a",
"Job",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/amsrp.py#L915-L940 |
gbowerman/azurerm | azurerm/deployments.py | list_deployment_operations | 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 | 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... | [
"def",
"list_deployment_operations",
"(",
"access_token",
",",
"subscription_id",
",",
"rg_name",
",",
"deployment_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
... | 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. | [
"List",
"all",
"operations",
"involved",
"in",
"a",
"given",
"deployment",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/deployments.py#L7-L24 |
gbowerman/azurerm | azurerm/networkrp.py | create_lb_with_nat_pool | 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 | 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... | [
"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",
")",
":",
"endpoint",
"=",
"''",
".",
"join",... | 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... | [
"Create",
"a",
"load",
"balancer",
"with",
"inbound",
"NAT",
"pools",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L7-L49 |
gbowerman/azurerm | azurerm/networkrp.py | create_nic | 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 | 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 ... | [
"def",
"create_nic",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"nic_name",
",",
"public_ip_id",
",",
"subnet_id",
",",
"location",
",",
"nsg_id",
"=",
"None",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endp... | 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... | [
"Create",
"a",
"network",
"interface",
"with",
"an",
"associated",
"public",
"ip",
"address",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L52-L85 |
gbowerman/azurerm | azurerm/networkrp.py | create_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... | python | 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... | [
"def",
"create_nsg",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"nsg_name",
",",
"location",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",... | 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... | [
"Create",
"network",
"security",
"group",
"(",
"use",
"create_nsg_rule",
"()",
"to",
"add",
"rules",
"to",
"it",
")",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L88-L108 |
gbowerman/azurerm | azurerm/networkrp.py | create_nsg_rule | 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 | 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'):
... | [
"def",
"create_nsg_rule",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"nsg_name",
",",
"nsg_rule_name",
",",
"description",
",",
"protocol",
"=",
"'Tcp'",
",",
"source_range",
"=",
"'*'",
",",
"destination_range",
"=",
"'*'",
",",
"s... | 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... | [
"Create",
"network",
"security",
"group",
"rule",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L111-L153 |
gbowerman/azurerm | azurerm/networkrp.py | create_public_ip | 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 | 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):... | [
"def",
"create_public_ip",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"public_ip_name",
",",
"dns_label",
",",
"location",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'"... | 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... | [
"Create",
"a",
"public",
"ip",
"address",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L156-L181 |
gbowerman/azurerm | azurerm/networkrp.py | create_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 authenticat... | python | 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... | [
"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",
")",
":",
"endpoint",
"="... | 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... | [
"Create",
"a",
"VNet",
"with",
"specified",
"name",
"and",
"location",
".",
"Optional",
"subnet",
"address",
"prefix",
".."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L184-L216 |
gbowerman/azurerm | azurerm/networkrp.py | delete_load_balancer | 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 | 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)... | [
"def",
"delete_load_balancer",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"lb_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/reso... | 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. | [
"Delete",
"a",
"load",
"balancer",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L219-L236 |
gbowerman/azurerm | azurerm/networkrp.py | delete_nic | 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): Na... | python | 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): Na... | [
"def",
"delete_nic",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"nic_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroup... | 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. | [
"Delete",
"a",
"network",
"interface",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L239-L256 |
gbowerman/azurerm | azurerm/networkrp.py | delete_nsg | 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 | 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):... | [
"def",
"delete_nsg",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"nsg_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroup... | 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. | [
"Delete",
"network",
"security",
"group",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L259-L276 |
gbowerman/azurerm | azurerm/networkrp.py | delete_nsg_rule | 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 | 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... | [
"def",
"delete_nsg_rule",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"nsg_name",
",",
"nsg_rule_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription... | 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... | [
"Delete",
"network",
"security",
"group",
"rule",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L279-L298 |
gbowerman/azurerm | azurerm/networkrp.py | delete_public_ip | 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 | 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 ... | [
"def",
"delete_public_ip",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"public_ip_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/r... | 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.
... | [
"Delete",
"a",
"public",
"ip",
"addresses",
"associated",
"with",
"a",
"resource",
"group",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L301-L318 |
gbowerman/azurerm | azurerm/networkrp.py | delete_vnet | 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 | 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... | [
"def",
"delete_vnet",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups/'... | 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. | [
"Delete",
"a",
"virtual",
"network",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L321-L338 |
gbowerman/azurerm | azurerm/networkrp.py | get_lb_nat_rule | 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 | 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... | [
"def",
"get_lb_nat_rule",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"lb_name",
",",
"rule_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",... | 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... | [
"Get",
"details",
"about",
"a",
"load",
"balancer",
"inbound",
"NAT",
"rule",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L341-L360 |
gbowerman/azurerm | azurerm/networkrp.py | get_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.
Retu... | python | 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... | [
"def",
"get_network_usage",
"(",
"access_token",
",",
"subscription_id",
",",
"location",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Network/locat... | 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. | [
"List",
"network",
"usage",
"and",
"limits",
"for",
"a",
"location",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L383-L398 |
gbowerman/azurerm | azurerm/networkrp.py | get_nic | 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 | 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 (... | [
"def",
"get_nic",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"nic_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups/'... | 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. | [
"Get",
"details",
"about",
"a",
"network",
"interface",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L401-L418 |
gbowerman/azurerm | azurerm/networkrp.py | get_public_ip | 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 | 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.
... | [
"def",
"get_public_ip",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"ip_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGro... | 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:
... | [
"Get",
"details",
"about",
"the",
"named",
"public",
"ip",
"address",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L421-L439 |
gbowerman/azurerm | azurerm/networkrp.py | get_vnet | 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 | 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... | [
"def",
"get_vnet",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"vnet_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups... | 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... | [
"Get",
"details",
"about",
"the",
"named",
"virtual",
"network",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L442-L459 |
gbowerman/azurerm | azurerm/networkrp.py | list_asgs | 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... | python | 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... | [
"def",
"list_asgs",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups/'",
",",
"resour... | 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. | [
"Get",
"details",
"about",
"the",
"application",
"security",
"groups",
"for",
"a",
"resource",
"group",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L462-L478 |
gbowerman/azurerm | azurerm/networkrp.py | list_asgs_all | 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.
'''
... | python | 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.
'''
... | [
"def",
"list_asgs_all",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Network/virtualNetworks/'",
",",
"... | 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. | [
"Get",
"details",
"about",
"the",
"application",
"security",
"groups",
"for",
"a",
"resource",
"group",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L481-L495 |
gbowerman/azurerm | azurerm/networkrp.py | list_lb_nat_rules | 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 | 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.
... | [
"def",
"list_lb_nat_rules",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"lb_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourc... | 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.... | [
"List",
"the",
"inbound",
"NAT",
"rules",
"for",
"a",
"load",
"balancer",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L498-L515 |
gbowerman/azurerm | azurerm/networkrp.py | list_load_balancers | 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 | 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.... | [
"def",
"list_load_balancers",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Network/'",
",",
"'/loadBala... | 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. | [
"List",
"the",
"load",
"balancers",
"in",
"a",
"subscription",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L518-L532 |
gbowerman/azurerm | azurerm/networkrp.py | list_nics | 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 | 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... | [
"def",
"list_nics",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Network/'",
",",
"'/networkInterfaces?... | 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. | [
"List",
"the",
"network",
"interfaces",
"in",
"a",
"subscription",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L554-L568 |
gbowerman/azurerm | azurerm/networkrp.py | list_nsgs_all | 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... | python | 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... | [
"def",
"list_nsgs_all",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Network/'",
",",
"'networkSEcurity... | 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. | [
"List",
"all",
"network",
"security",
"groups",
"in",
"a",
"subscription",
".",
"Args",
":",
"access_token",
"(",
"str",
")",
":",
"a",
"valid",
"Azure",
"Authentication",
"token",
".",
"subscription_id",
"(",
"str",
")",
":",
"Azure",
"subscription",
"id",
... | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L608-L621 |
gbowerman/azurerm | azurerm/networkrp.py | list_vnets | 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 | 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 = '... | [
"def",
"list_vnets",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Network/'",
",",
"'/virtualNetworks?a... | 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. | [
"List",
"the",
"VNETs",
"in",
"a",
"subscription",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L643-L657 |
gbowerman/azurerm | azurerm/networkrp.py | update_load_balancer | 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 | 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 ... | [
"def",
"update_load_balancer",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"lb_name",
",",
"body",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",... | 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 resource group name.
lb_name (str): Name of the new load balancer.
body (str): ... | [
"Updates",
"a",
"load",
"balancer",
"model",
"i",
".",
"e",
".",
"PUT",
"an",
"updated",
"LB",
"body",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/networkrp.py#L679-L697 |
gbowerman/azurerm | examples/list_quota.py | print_region_quota | 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 | 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=(',', ': ')))
... | [
"def",
"print_region_quota",
"(",
"access_token",
",",
"sub_id",
",",
"region",
")",
":",
"print",
"(",
"region",
"+",
"':'",
")",
"quota",
"=",
"azurerm",
".",
"get_compute_usage",
"(",
"access_token",
",",
"sub_id",
",",
"region",
")",
"if",
"SUMMARY",
"... | Print the Compute usage quota for a specific region | [
"Print",
"the",
"Compute",
"usage",
"quota",
"for",
"a",
"specific",
"region"
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/list_quota.py#L9-L22 |
gbowerman/azurerm | examples/list_quota.py | main | def main():
'''Main routine.'''
# check for single command argument
if len(sys.argv) != 2:
region = 'all'
else:
region = sys.argv[1]
# Load Azure app defaults
try:
with open('azurermconfig.json') as config_file:
config_data = json.load(config_file)
except... | python | def main():
'''Main routine.'''
# check for single command argument
if len(sys.argv) != 2:
region = 'all'
else:
region = sys.argv[1]
# Load Azure app defaults
try:
with open('azurermconfig.json') as config_file:
config_data = json.load(config_file)
except... | [
"def",
"main",
"(",
")",
":",
"# check for single command argument",
"if",
"len",
"(",
"sys",
".",
"argv",
")",
"!=",
"2",
":",
"region",
"=",
"'all'",
"else",
":",
"region",
"=",
"sys",
".",
"argv",
"[",
"1",
"]",
"# Load Azure app defaults",
"try",
":"... | Main routine. | [
"Main",
"routine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/list_quota.py#L24-L53 |
gbowerman/azurerm | examples/list_pubs.py | main | def main():
'''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 azurermonfig.json in current folder")
tenant_id = config_data['tenantI... | python | def main():
'''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 azurermonfig.json in current folder")
tenant_id = config_data['tenantI... | [
"def",
"main",
"(",
")",
":",
"# Load Azure app defaults",
"try",
":",
"with",
"open",
"(",
"'azurermconfig.json'",
")",
"as",
"config_file",
":",
"config_data",
"=",
"json",
".",
"load",
"(",
"config_file",
")",
"except",
"FileNotFoundError",
":",
"sys",
".",... | Main routine. | [
"Main",
"routine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/list_pubs.py#L7-L42 |
gbowerman/azurerm | examples/deploytemplatecli.py | main | def main():
'''Main routine.'''
# validate command line arguments
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--uri', '-u', required=True, action='store', help='Template URI')
arg_parser.add_argument('--params', '-p', required=True, action='store',
he... | python | def main():
'''Main routine.'''
# validate command line arguments
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--uri', '-u', required=True, action='store', help='Template URI')
arg_parser.add_argument('--params', '-p', required=True, action='store',
he... | [
"def",
"main",
"(",
")",
":",
"# validate command line arguments",
"arg_parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
")",
"arg_parser",
".",
"add_argument",
"(",
"'--uri'",
",",
"'-u'",
",",
"required",
"=",
"True",
",",
"action",
"=",
"'store'",
",",... | Main routine. | [
"Main",
"routine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/deploytemplatecli.py#L10-L47 |
gbowerman/azurerm | examples/delete_rg.py | main | def main():
'''Main routine.'''
# check for single command argument
if len(sys.argv) != 2:
sys.exit('Usage: python ' + sys.argv[0] + ' rg_name')
rgname = sys.argv[1]
# if in Azure cloud shell, authenticate using the MSI endpoint
if 'ACC_CLOUD' in os.environ and 'MSI_ENDPOINT' in os.env... | python | def main():
'''Main routine.'''
# check for single command argument
if len(sys.argv) != 2:
sys.exit('Usage: python ' + sys.argv[0] + ' rg_name')
rgname = sys.argv[1]
# if in Azure cloud shell, authenticate using the MSI endpoint
if 'ACC_CLOUD' in os.environ and 'MSI_ENDPOINT' in os.env... | [
"def",
"main",
"(",
")",
":",
"# check for single command argument",
"if",
"len",
"(",
"sys",
".",
"argv",
")",
"!=",
"2",
":",
"sys",
".",
"exit",
"(",
"'Usage: python '",
"+",
"sys",
".",
"argv",
"[",
"0",
"]",
"+",
"' rg_name'",
")",
"rgname",
"=",
... | Main routine. | [
"Main",
"routine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/delete_rg.py#L9-L38 |
gbowerman/azurerm | examples/list_locations.py | main | def main():
'''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['tenant... | python | def main():
'''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['tenant... | [
"def",
"main",
"(",
")",
":",
"# Load Azure app defaults",
"try",
":",
"with",
"open",
"(",
"'azurermconfig.json'",
")",
"as",
"config_file",
":",
"config_data",
"=",
"json",
".",
"load",
"(",
"config_file",
")",
"except",
"FileNotFoundError",
":",
"sys",
".",... | Main routine. | [
"Main",
"routine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/list_locations.py#L7-L30 |
gbowerman/azurerm | examples/scale_vmss.py | main | def main():
'''main routine'''
# process arguments
if len(sys.argv) < 4:
usage()
rgname = sys.argv[1]
vmss_name = sys.argv[2]
capacity = sys.argv[3]
# Load Azure app defaults
try:
with open('azurermconfig.json') as config_file:
config_data = json.load(confi... | python | def main():
'''main routine'''
# process arguments
if len(sys.argv) < 4:
usage()
rgname = sys.argv[1]
vmss_name = sys.argv[2]
capacity = sys.argv[3]
# Load Azure app defaults
try:
with open('azurermconfig.json') as config_file:
config_data = json.load(confi... | [
"def",
"main",
"(",
")",
":",
"# process arguments",
"if",
"len",
"(",
"sys",
".",
"argv",
")",
"<",
"4",
":",
"usage",
"(",
")",
"rgname",
"=",
"sys",
".",
"argv",
"[",
"1",
"]",
"vmss_name",
"=",
"sys",
".",
"argv",
"[",
"2",
"]",
"capacity",
... | main routine | [
"main",
"routine"
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/scale_vmss.py#L12-L39 |
gbowerman/azurerm | examples/list_vmss_vms.py | main | def main():
'''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 FileNotF... | python | def main():
'''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 FileNotF... | [
"def",
"main",
"(",
")",
":",
"# process arguments",
"if",
"len",
"(",
"sys",
".",
"argv",
")",
"<",
"3",
":",
"usage",
"(",
")",
"rgname",
"=",
"sys",
".",
"argv",
"[",
"1",
"]",
"vmss_name",
"=",
"sys",
".",
"argv",
"[",
"2",
"]",
"# Load Azure... | main routine | [
"main",
"routine"
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/examples/list_vmss_vms.py#L13-L44 |
gbowerman/azurerm | azurerm/computerp.py | create_as | 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 | 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... | [
"def",
"create_as",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"as_name",
",",
"update_domains",
",",
"fault_domains",
",",
"location",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'... | Create 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 the new availability set.
update_domains (int): Number of update domai... | [
"Create",
"availability",
"set",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L9-L35 |
gbowerman/azurerm | azurerm/computerp.py | create_vm | 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 | 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... | [
"def",
"create_vm",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"vm_name",
",",
"vm_size",
",",
"publisher",
",",
"offer",
",",
"sku",
",",
"version",
",",
"nic_id",
",",
"location",
",",
"storage_type",
"=",
"'Standard_LRS'",
",",... | Create a new Azure virtual machine.
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 the new virtual machine.
vm_size (str): Size of virtual mac... | [
"Create",
"a",
"new",
"Azure",
"virtual",
"machine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L38-L104 |
gbowerman/azurerm | azurerm/computerp.py | create_vmss | 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 | 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... | [
"def",
"create_vmss",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"vmss_name",
",",
"vm_size",
",",
"capacity",
",",
"publisher",
",",
"offer",
",",
"sku",
",",
"version",
",",
"subnet_id",
",",
"location",
",",
"be_pool_id",
"=",
... | Create 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_name (str): Name of the new scale set.
vm_size (str): Size of virtual machine, ... | [
"Create",
"virtual",
"machine",
"scale",
"set",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L107-L193 |
gbowerman/azurerm | azurerm/computerp.py | delete_as | 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 | 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 ... | [
"def",
"delete_as",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"as_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups/... | 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 the availability set.
Returns:
HTTP response. | [
"Delete",
"availability",
"set",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L217-L234 |
gbowerman/azurerm | azurerm/computerp.py | delete_vm | def delete_vm(access_token, subscription_id, resource_group, vm_name):
'''Delete a virtual machine.
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 | def delete_vm(access_token, subscription_id, resource_group, vm_name):
'''Delete a virtual machine.
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... | [
"def",
"delete_vm",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"vm_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups/... | Delete a virtual machine.
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 the virtual machine.
Returns:
HTTP response. | [
"Delete",
"a",
"virtual",
"machine",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L237-L254 |
gbowerman/azurerm | azurerm/computerp.py | delete_vmss | 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 | 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... | [
"def",
"delete_vmss",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"vmss_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGro... | 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_name (str): Name of the virtual machine scale set.
Returns:
HTTP respons... | [
"Delete",
"a",
"virtual",
"machine",
"scale",
"set",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L257-L274 |
gbowerman/azurerm | azurerm/computerp.py | delete_vmss_vms | 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 | 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... | [
"def",
"delete_vmss_vms",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"vmss_name",
",",
"vm_ids",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
... | 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.
vmss_name (str): Name of the virtual machine scale set.
vm_ids (str): String representa... | [
"Delete",
"a",
"VM",
"in",
"a",
"VM",
"Scale",
"Set",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L277-L296 |
gbowerman/azurerm | azurerm/computerp.py | get_compute_usage | 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 | 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... | [
"def",
"get_compute_usage",
"(",
"access_token",
",",
"subscription_id",
",",
"location",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.compute/locat... | 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.
Returns:
HTTP response. JSON body of Compute usage and limits data. | [
"List",
"compute",
"usage",
"and",
"limits",
"for",
"a",
"location",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L299-L314 |
gbowerman/azurerm | azurerm/computerp.py | get_vm | 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 | 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... | [
"def",
"get_vm",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"vm_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups/'",... | 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 the virtual machine.
Returns:
HTTP response. JSON body of VM ... | [
"Get",
"virtual",
"machine",
"details",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L317-L334 |
gbowerman/azurerm | azurerm/computerp.py | get_vm_extension | 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 | 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.... | [
"def",
"get_vm_extension",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"vm_name",
",",
"extension_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscriptio... | 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.
vm_name (str): Name of the virtual machine.
extension_name (str): VM extension name.... | [
"Get",
"details",
"about",
"a",
"VM",
"extension",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L337-L356 |
gbowerman/azurerm | azurerm/computerp.py | get_vmss | 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 | 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... | [
"def",
"get_vmss",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"vmss_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups... | 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_name (str): Name of the virtual machine scale set.
Returns:
HTTP resp... | [
"Get",
"virtual",
"machine",
"scale",
"set",
"details",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L379-L396 |
gbowerman/azurerm | azurerm/computerp.py | get_vmss_vm | 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 | 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.
... | [
"def",
"get_vmss_vm",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"vmss_name",
",",
"instance_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_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.
vmss_name (str): Name of the virtual machine scale set.
instance_id (int): VM ID of th... | [
"Get",
"individual",
"VMSS",
"VM",
"details",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L479-L498 |
gbowerman/azurerm | azurerm/computerp.py | get_as | 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 | 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... | [
"def",
"get_as",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
",",
"as_name",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups/'",... | 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 of the new availability set.
Returns:
HTTP response. JSON body ... | [
"Get",
"availability",
"set",
"details",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L546-L563 |
gbowerman/azurerm | azurerm/computerp.py | list_as_sub | 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 | 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.
... | [
"def",
"list_as_sub",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Compute/availabilitySets'",
",",
"'?... | 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. | [
"List",
"availability",
"sets",
"in",
"a",
"subscription",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L585-L599 |
gbowerman/azurerm | azurerm/computerp.py | list_vm_images_sub | 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 | 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 = '... | [
"def",
"list_vm_images_sub",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Compute/images'",
",",
"'?api... | 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. | [
"List",
"VM",
"images",
"in",
"a",
"subscription",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L602-L616 |
gbowerman/azurerm | azurerm/computerp.py | list_vms | 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 | 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.... | [
"def",
"list_vms",
"(",
"access_token",
",",
"subscription_id",
",",
"resource_group",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/resourceGroups/'",
",",
"resourc... | 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. JSON body of a list of VM model views. | [
"List",
"VMs",
"in",
"a",
"resource",
"group",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L619-L635 |
gbowerman/azurerm | azurerm/computerp.py | list_vms_sub | 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 | 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(... | [
"def",
"list_vms_sub",
"(",
"access_token",
",",
"subscription_id",
")",
":",
"endpoint",
"=",
"''",
".",
"join",
"(",
"[",
"get_rm_endpoint",
"(",
")",
",",
"'/subscriptions/'",
",",
"subscription_id",
",",
"'/providers/Microsoft.Compute/virtualMachines'",
",",
"'?... | 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. | [
"List",
"VMs",
"in",
"a",
"subscription",
"."
] | train | https://github.com/gbowerman/azurerm/blob/79d40431d3b13f8a36aadbff5029888383d72674/azurerm/computerp.py#L638-L652 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.