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 object model deserializer.

Variables

api_version – Client API Version. Constant value: “2016-07-01-preview”.

create(resource_group_name, gateway_name, location=None, tags=None, upgrade_mode=None, custom_headers=None, raw=False, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns GatewayResource or ClientRawResponse<GatewayResource> if raw==True

Return type

AzureOperationPoller[GatewayResource] or AzureOperationPoller[ClientRawResponse[GatewayResource]]

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.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

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.

Returns

GatewayResource or ClientRawResponse if raw=true

Return type

GatewayResource or ClientRawResponse

Raises

ErrorException

get_profile(resource_group_name, gateway_name, custom_headers=None, raw=False, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns GatewayProfile or ClientRawResponse<GatewayProfile> if raw==True

Return type

AzureOperationPoller[GatewayProfile] or AzureOperationPoller[ClientRawResponse[GatewayProfile]]

Raises

ErrorException

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

Returns gateways in a subscription.

Parameters
  • 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.

Returns

An iterator like instance of GatewayResource

Return type

GatewayResourcePaged[GatewayResource]

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.

Returns

An iterator like instance of GatewayResource

Return type

GatewayResourcePaged[GatewayResource]

Raises

ErrorException

regenerate_profile(resource_group_name, gateway_name, custom_headers=None, raw=False, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True

Return type

AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]

Raises

ErrorException

update(resource_group_name, gateway_name, location=None, tags=None, upgrade_mode=None, custom_headers=None, raw=False, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns GatewayResource or ClientRawResponse<GatewayResource> if raw==True

Return type

AzureOperationPoller[GatewayResource] or AzureOperationPoller[ClientRawResponse[GatewayResource]]

Raises

ErrorException

upgrade(resource_group_name, gateway_name, custom_headers=None, raw=False, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True

Return type

AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]

Raises

ErrorException

models = <module 'azure.mgmt.servermanager.models' from '/home/vsts/work/1/s/sdk/servermanager/azure-mgmt-servermanager/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/servermanager/models/__init__.py'>
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 object model deserializer.

Variables

api_version – Client API Version. Constant value: “2016-07-01-preview”.

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, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns NodeResource or ClientRawResponse<NodeResource> if raw==True

Return type

AzureOperationPoller[NodeResource] or AzureOperationPoller[ClientRawResponse[NodeResource]]

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.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

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.

Returns

NodeResource or ClientRawResponse if raw=true

Return type

NodeResource or ClientRawResponse

Raises

ErrorException

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

Lists nodes in a subscription.

Parameters
  • 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.

Returns

An iterator like instance of NodeResource

Return type

NodeResourcePaged[NodeResource]

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.

Returns

An iterator like instance of NodeResource

Return type

NodeResourcePaged[NodeResource]

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, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns NodeResource or ClientRawResponse<NodeResource> if raw==True

Return type

AzureOperationPoller[NodeResource] or AzureOperationPoller[ClientRawResponse[NodeResource]]

Raises

ErrorException

models = <module 'azure.mgmt.servermanager.models' from '/home/vsts/work/1/s/sdk/servermanager/azure-mgmt-servermanager/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/servermanager/models/__init__.py'>
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 object model deserializer.

Variables

api_version – Client API Version. Constant value: “2016-07-01-preview”.

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, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns SessionResource or ClientRawResponse<SessionResource> if raw==True

Return type

AzureOperationPoller[SessionResource] or AzureOperationPoller[ClientRawResponse[SessionResource]]

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.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

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.

Returns

SessionResource or ClientRawResponse if raw=true

Return type

SessionResource or ClientRawResponse

Raises

ErrorException

models = <module 'azure.mgmt.servermanager.models' from '/home/vsts/work/1/s/sdk/servermanager/azure-mgmt-servermanager/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/servermanager/models/__init__.py'>
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 object model deserializer.

Variables

api_version – Client API Version. Constant value: “2016-07-01-preview”.

cancel_command(resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns PowerShellCommandResults or ClientRawResponse<PowerShellCommandResults> if raw==True

Return type

AzureOperationPoller[PowerShellCommandResults] or AzureOperationPoller[ClientRawResponse[PowerShellCommandResults]]

Raises

ErrorException

create_session(resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns PowerShellSessionResource or ClientRawResponse<PowerShellSessionResource> if raw==True

Return type

AzureOperationPoller[PowerShellSessionResource] or AzureOperationPoller[ClientRawResponse[PowerShellSessionResource]]

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.

Returns

PowerShellCommandStatus or ClientRawResponse if raw=true

Return type

PowerShellCommandStatus or ClientRawResponse

Raises

ErrorException

invoke_command(resource_group_name, node_name, session, pssession, command=None, custom_headers=None, raw=False, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns PowerShellCommandResults or ClientRawResponse<PowerShellCommandResults> if raw==True

Return type

AzureOperationPoller[PowerShellCommandResults] or AzureOperationPoller[ClientRawResponse[PowerShellCommandResults]]

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.

Returns

PowerShellSessionResources or ClientRawResponse if raw=true

Return type

PowerShellSessionResources or ClientRawResponse

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.

Returns

PowerShellTabCompletionResults or ClientRawResponse if raw=true

Return type

PowerShellTabCompletionResults or ClientRawResponse

Raises

ErrorException

update_command(resource_group_name, node_name, session, pssession, custom_headers=None, raw=False, polling=True, **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) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns PowerShellCommandResults or ClientRawResponse<PowerShellCommandResults> if raw==True

Return type

AzureOperationPoller[PowerShellCommandResults] or AzureOperationPoller[ClientRawResponse[PowerShellCommandResults]]

Raises

ErrorException

models = <module 'azure.mgmt.servermanager.models' from '/home/vsts/work/1/s/sdk/servermanager/azure-mgmt-servermanager/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/servermanager/models/__init__.py'>