azure.mgmt.servermanager.operations module

class azure.mgmt.servermanager.operations.GatewayOperations(client, config, serializer, deserializer)[source]

Bases: object

GatewayOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
create(resource_group_name, gateway_name, location=None, tags=None, upgrade_mode=None, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a ManagementService gateway.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • gateway_name (str) – The gateway name (256 characters maximum).
  • location (str) – Location of the resource.
  • tags (object) – Resource tags.
  • upgrade_mode (str or upgradeMode) – The upgradeMode property gives the flexibility to gateway to auto upgrade itself. If properties value not specified, then we assume upgradeMode = Automatic. Possible values include: ‘Manual’, ‘Automatic’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns GatewayResource

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

delete(resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a gateway from a resource group.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • gateway_name (str) – The gateway name (256 characters maximum).
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

get(resource_group_name, gateway_name, expand=None, custom_headers=None, raw=False, **operation_config)[source]

Gets a gateway.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • gateway_name (str) – The gateway name (256 characters maximum)
  • expand (str or GatewayExpandOption) – Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Possible values include: ‘status’, ‘download’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

GatewayResource

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

get_profile(resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a gateway profile.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • gateway_name (str) – The gateway name (256 characters maximum).
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns GatewayProfile

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

list(custom_headers=None, raw=False, **operation_config)[source]

Returns gateways in a subscription.

Parameters:
Return type:

GatewayResourcePaged

Raises:

ErrorException

list_for_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Returns gateways in a resource group.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

GatewayResourcePaged

Raises:

ErrorException

regenerate_profile(resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config)[source]

Regenerate a gateway’s profile.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • gateway_name (str) – The gateway name (256 characters maximum).
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

update(resource_group_name, gateway_name, location=None, tags=None, upgrade_mode=None, custom_headers=None, raw=False, **operation_config)[source]

Updates a gateway belonging to a resource group.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • gateway_name (str) – The gateway name (256 characters maximum).
  • location (str) – Location of the resource.
  • tags (object) – Resource tags.
  • upgrade_mode (str or upgradeMode) – The upgradeMode property gives the flexibility to gateway to auto upgrade itself. If properties value not specified, then we assume upgradeMode = Automatic. Possible values include: ‘Manual’, ‘Automatic’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns GatewayResource

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

upgrade(resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config)[source]

Upgrades a gateway.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • gateway_name (str) – The gateway name (256 characters maximum).
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

class azure.mgmt.servermanager.operations.NodeOperations(client, config, serializer, deserializer)[source]

Bases: object

NodeOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
create(resource_group_name, node_name, location=None, tags=None, gateway_id=None, connection_name=None, user_name=None, password=None, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a management node.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • location (str) – Location of the resource.
  • tags (object) – Resource tags.
  • gateway_id (str) – Gateway ID which will manage this node.
  • connection_name (str) – myhost.domain.com
  • user_name (str) – User name to be used to connect to node.
  • password (str) – Password associated with user name.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns NodeResource

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

delete(resource_group_name, node_name, custom_headers=None, raw=False, **operation_config)[source]

deletes a management node.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

get(resource_group_name, node_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a management node.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

NodeResource

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

list(custom_headers=None, raw=False, **operation_config)[source]

Lists nodes in a subscription.

Parameters:
Return type:

NodeResourcePaged

Raises:

ErrorException

list_for_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Lists nodes in a resource group.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

NodeResourcePaged

Raises:

ErrorException

update(resource_group_name, node_name, location=None, tags=None, gateway_id=None, connection_name=None, user_name=None, password=None, custom_headers=None, raw=False, **operation_config)[source]

Updates a management node.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • location (str) – Location of the resource.
  • tags (object) – Resource tags.
  • gateway_id (str) – Gateway ID which will manage this node.
  • connection_name (str) – myhost.domain.com
  • user_name (str) – User name to be used to connect to node.
  • password (str) – Password associated with user name.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns NodeResource

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

class azure.mgmt.servermanager.operations.SessionOperations(client, config, serializer, deserializer)[source]

Bases: object

SessionOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
create(resource_group_name, node_name, session, user_name=None, password=None, retention_period=None, credential_data_format=None, encryption_certificate_thumbprint=None, custom_headers=None, raw=False, **operation_config)[source]

Creates a session for a node.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • session (str) – The sessionId from the user.
  • user_name (str) – Encrypted User name to be used to connect to node.
  • password (str) – Encrypted Password associated with user name.
  • retention_period (str or retentionPeriod) – Session retention period. Possible values include: ‘Session’, ‘Persistent’
  • credential_data_format (str or credentialDataFormat) – Credential data format. Possible values include: ‘RsaEncrypted’
  • encryption_certificate_thumbprint (str) – Encryption certificate thumbprint.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns SessionResource

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

delete(resource_group_name, node_name, session, custom_headers=None, raw=False, **operation_config)[source]

Deletes a session for a node.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • session (str) – The sessionId from the user.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

get(resource_group_name, node_name, session, custom_headers=None, raw=False, **operation_config)[source]

Gets a session for a node.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • session (str) – The sessionId from the user.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

SessionResource

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

class azure.mgmt.servermanager.operations.PowerShellOperations(client, config, serializer, deserializer)[source]

Bases: object

PowerShellOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
cancel_command(resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, **operation_config)[source]

Cancels a PowerShell command.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • session (str) – The sessionId from the user.
  • pssession (str) – The PowerShell sessionId from the user.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns PowerShellCommandResults

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

create_session(resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, **operation_config)[source]

Creates a PowerShell session.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • session (str) – The sessionId from the user.
  • pssession (str) – The PowerShell sessionId from the user.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns PowerShellSessionResource

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

get_command_status(resource_group_name, node_name, session, pssession, expand=None, custom_headers=None, raw=False, **operation_config)[source]

Gets the status of a command.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • session (str) – The sessionId from the user.
  • pssession (str) – The PowerShell sessionId from the user.
  • expand (str or PowerShellExpandOption) – Gets current output from an ongoing call. Possible values include: ‘output’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

PowerShellCommandStatus

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

invoke_command(resource_group_name, node_name, session, pssession, command=None, custom_headers=None, raw=False, **operation_config)[source]

Creates a PowerShell script and invokes it.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • session (str) – The sessionId from the user.
  • pssession (str) – The PowerShell sessionId from the user.
  • command (str) – Script to execute.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns PowerShellCommandResults

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

list_session(resource_group_name, node_name, session, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of the active sessions.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • session (str) – The sessionId from the user.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

PowerShellSessionResources

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

tab_completion(resource_group_name, node_name, session, pssession, command=None, custom_headers=None, raw=False, **operation_config)[source]

Gets tab completion values for a command.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • session (str) – The sessionId from the user.
  • pssession (str) – The PowerShell sessionId from the user.
  • command (str) – Command to get tab completion for.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

PowerShellTabCompletionResults

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

update_command(resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, **operation_config)[source]

Updates a running PowerShell command with more data.

Parameters:
  • resource_group_name (str) – The resource group name uniquely identifies the resource group within the user subscriptionId.
  • node_name (str) – The node name (256 characters maximum).
  • session (str) – The sessionId from the user.
  • pssession (str) – The PowerShell sessionId from the user.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns PowerShellCommandResults

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException