RemoteComputeAttachConfiguration 類別

表示附加遠端計算目標的組態參數。

attach_configuration使用 類別的 RemoteCompute 方法來指定附加參數。

初始化組態物件。

繼承
RemoteComputeAttachConfiguration

建構函式

RemoteComputeAttachConfiguration(username, subscription_id=None, resource_group=None, vm_name=None, resource_id=None, address=None, ssh_port=22, password='', private_key_file='', private_key_passphrase='')

參數

username
str
必要

存取資源所需的使用者名稱。

subscription_id
str
預設值: None

虛擬機器所在的 Azure 訂用帳戶識別碼。

resource_group
str
預設值: None

虛擬機器所在的資源組名。

vm_name
str
預設值: None

虛擬機器名稱。

resource_id
str
預設值: None

要附加之資源的 arm resource_id。

address
str
預設值: None

要附加之資源的位址。

ssh_port
int
預設值: 22

資源的公開端口。 預設為 22。

password
str
必要

存取資源所需的密碼。

private_key_file
str
必要

包含資源私密金鑰的檔案路徑。

private_key_passphrase
str
必要

存取資源所需的私密金鑰片語。

username
str
必要

存取資源所需的使用者名稱。

subscription_id
str
必要

虛擬機器所在的 Azure 訂用帳戶識別碼。

resource_group
str
必要

虛擬機器所在的資源組名。

vm_name
str
必要

虛擬機器名稱。

resource_id
str
必要

要附加之資源的 arm resource_id。

address
str
必要

要附加之資源的位址。

ssh_port
int
必要

資源的公開端口。 預設為 22。

password
str
必要

存取資源所需的密碼。

private_key_file
str
必要

包含資源私密金鑰的檔案路徑。

private_key_passphrase
str
必要

存取資源所需的私密金鑰片語。

方法

validate_configuration

檢查指定的組態值是否有效。

如果驗證失敗, ComputeTargetException 則引發 。

validate_configuration

檢查指定的組態值是否有效。

如果驗證失敗, ComputeTargetException 則引發 。

validate_configuration()

例外狀況