Guest Configuration Assignments - Create Or Update

VM とゲスト構成の間の関連付けを作成します

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}?api-version=2022-01-25

URI パラメーター

名前 / 必須 説明
guestConfigurationAssignmentName
path True

string

ゲスト構成の割り当ての名前。

resourceGroupName
path True

string

リソース グループ名。

Regex pattern: ^[-\w\._]+$

subscriptionId
path True

string

Microsoft Azure サブスクリプションを一意に識別するサブスクリプション ID。 サブスクリプション ID は、全ての修理依頼についてURI の一部を生じさせます。

vmName
path True

string

仮想マシンの名前。

Regex pattern: ^[a-zA-Z0-9][-a-zA-Z0-9_.]*[a-zA-Z0-9]$

api-version
query True

string

クライアント API のバージョン。

要求本文

名前 説明
location

string

VM が配置されているリージョン。

name

string

ゲスト構成の割り当ての名前。

properties

GuestConfigurationAssignmentProperties

ゲスト構成割り当てのプロパティ。

応答

名前 説明
200 OK

GuestConfigurationAssignment

OK です。 VM のゲスト構成の割り当てが正常に更新されました。

201 Created

GuestConfigurationAssignment

作成されました。 VM のゲスト構成の割り当てが正常に作成されました。

Other Status Codes

ErrorResponse

操作に失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名前 説明
user_impersonation ユーザー アカウントの借用

Create or update guest configuration assignment

Sample Request

PUT https://management.azure.com/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/NotInstalledApplicationForWindows?api-version=2022-01-25

{
  "location": "westcentralus",
  "name": "NotInstalledApplicationForWindows",
  "properties": {
    "context": "Azure policy",
    "guestConfiguration": {
      "name": "NotInstalledApplicationForWindows",
      "version": "1.0.0.3",
      "contentUri": "https://thisisfake/pacakge",
      "contentHash": "123contenthash",
      "assignmentType": "ApplyAndAutoCorrect",
      "configurationParameter": [
        {
          "name": "[InstalledApplication]NotInstalledApplicationResource1;Name",
          "value": "NotePad,sql"
        }
      ]
    }
  }
}

Sample Response

{
  "location": "westcentralus",
  "id": "/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/NotInstalledApplicationForWindows",
  "name": "NotInstalledApplicationForWindows",
  "properties": {
    "complianceStatus": "Pending",
    "assignmentHash": null,
    "latestReportId": null,
    "lastComplianceStatusChecked": null,
    "context": "Azure policy",
    "resourceType": null,
    "vmssVMList": null,
    "guestConfiguration": {
      "kind": null,
      "name": "NotInstalledApplicationForWindows",
      "version": "1.0.0.3",
      "contentUri": null,
      "contentHash": null,
      "contentType": null,
      "assignmentSource": "AzurePolicy",
      "configurationParameter": [
        {
          "name": "[InstalledApplication]NotInstalledApplicationResource1;Name",
          "value": "NotePad,sql"
        }
      ]
    },
    "provisioningState": "Succeeded"
  }
}
{
  "location": "westcentralus",
  "id": "/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/NotInstalledApplicationForWindows",
  "name": "NotInstalledApplicationForWindows",
  "properties": {
    "complianceStatus": "Pending",
    "assignmentHash": null,
    "latestReportId": null,
    "lastComplianceStatusChecked": null,
    "context": "Azure policy",
    "resourceType": null,
    "vmssVMList": null,
    "guestConfiguration": {
      "kind": null,
      "name": "NotInstalledApplicationForWindows",
      "version": "1.0.0.3",
      "contentUri": null,
      "contentHash": null,
      "contentType": null,
      "assignmentSource": "AzurePolicy",
      "configurationParameter": [
        {
          "name": "[InstalledApplication]NotInstalledApplicationResource1;Name",
          "value": "NotePad,sql"
        }
      ]
    },
    "provisioningState": "Succeeded"
  }
}

定義

名前 説明
actionAfterReboot

構成の適用中の再起動後の動作を指定します。 指定できる値は ContinueConfiguration と StopConfiguration です。

AssignmentInfo

ゲスト構成の割り当てに関する情報。

AssignmentReport
AssignmentReportResource

ゲスト構成の割り当てリソース。

AssignmentReportResourceComplianceReason

ゲスト構成割り当てリソースのコンプライアンスの理由とコード。

assignmentType

構成の割り当ての種類と実行を指定します。 使用できる値は、Audit、DeployAndAutoCorrect、ApplyAndAutoCorrect、ApplyAndMonitor です。

complianceStatus

割り当てられたゲスト構成のマシンのコンプライアンス状態を示す値。

ConfigurationInfo

構成に関する情報。

configurationMode

LCM(ローカル Configuration Manager) がターゲット ノードに構成を実際に適用する方法を指定します。 使用可能な値は、ApplyOnly、ApplyAndMonitor、および ApplyAndAutoCorrect です。

ConfigurationParameter

構成パラメーターを表します。

ConfigurationSetting

LCM の構成設定 (ローカル Configuration Manager)。

createdByType

リソースを作成した ID の種類。

Error
ErrorResponse

操作エラーのエラー応答

GuestConfigurationAssignment

ゲスト構成の割り当ては、マシンとゲスト構成の間の関連付けです。

GuestConfigurationAssignmentProperties

ゲスト構成の割り当てプロパティ。

GuestConfigurationNavigation

ゲスト構成は、DSC 構成とその依存関係をカプセル化する成果物です。 成果物は、DSC 構成 (MOF として) と依存リソース、およびモジュールなどのその他の依存関係を含む zip ファイルです。

kind

ゲスト構成の種類。 例: DSC

provisioningState

プロビジョニング状態。これは応答にのみ表示されます。

systemData

リソースの作成と最後の変更に関連するメタデータ。

type

レポートの種類、整合性、または初期

VMInfo

VM に関する情報。

VMSSVMInfo

VMSS VM に関する情報

actionAfterReboot

構成の適用中の再起動後の動作を指定します。 指定できる値は ContinueConfiguration と StopConfiguration です。

名前 説明
ContinueConfiguration

string

StopConfiguration

string

AssignmentInfo

ゲスト構成の割り当てに関する情報。

名前 説明
configuration

ConfigurationInfo

構成に関する情報。

name

string

ゲスト構成の割り当ての名前。

AssignmentReport

名前 説明
assignment

AssignmentInfo

ゲスト構成割り当ての構成の詳細。

complianceStatus

complianceStatus

割り当てられたゲスト構成のマシンのコンプライアンス状態を示す値。

endTime

string

ゲスト構成の割り当てコンプライアンス状態チェックの終了日時。

id

string

ゲスト構成割り当てのレポートの ARM リソース ID。

operationType

type

レポートの種類、整合性、または初期

reportId

string

サブスクリプション、リソース グループの下にあるゲスト構成割り当てレポートを識別する GUID。

resources

AssignmentReportResource[]

ゲスト構成の割り当てコンプライアンスがチェックされるリソースの一覧。

startTime

string

ゲスト構成の割り当てコンプライアンスの状態チェックの開始日時。

vm

VMInfo

VM に関する情報。

AssignmentReportResource

ゲスト構成の割り当てリソース。

名前 説明
complianceStatus

complianceStatus

割り当てられたゲスト構成のマシンのコンプライアンス状態を示す値。

properties

object

ゲスト構成割り当てリソースのプロパティ。

reasons

AssignmentReportResourceComplianceReason[]

リソースのコンプライアンス理由と理由コード。

resourceId

string

ゲスト構成割り当てリソース設定の名前。

AssignmentReportResourceComplianceReason

ゲスト構成割り当てリソースのコンプライアンスの理由とコード。

名前 説明
code

string

ゲスト構成割り当てリソースのコンプライアンスのコード。

phrase

string

ゲスト構成割り当てリソースのコンプライアンスの理由。

assignmentType

構成の割り当ての種類と実行を指定します。 使用できる値は、Audit、DeployAndAutoCorrect、ApplyAndAutoCorrect、ApplyAndMonitor です。

名前 説明
ApplyAndAutoCorrect

string

ApplyAndMonitor

string

Audit

string

DeployAndAutoCorrect

string

complianceStatus

割り当てられたゲスト構成のマシンのコンプライアンス状態を示す値。

名前 説明
Compliant

string

NonCompliant

string

Pending

string

ConfigurationInfo

構成に関する情報。

名前 説明
name

string

構成の名前。

version

string

構成のバージョン。

configurationMode

LCM(ローカル Configuration Manager) がターゲット ノードに構成を実際に適用する方法を指定します。 使用可能な値は、ApplyOnly、ApplyAndMonitor、および ApplyAndAutoCorrect です。

名前 説明
ApplyAndAutoCorrect

string

ApplyAndMonitor

string

ApplyOnly

string

ConfigurationParameter

構成パラメーターを表します。

名前 説明
name

string

構成パラメーターの名前。

value

string

構成パラメーターの値。

ConfigurationSetting

LCM の構成設定 (ローカル Configuration Manager)。

名前 既定値 説明
actionAfterReboot

actionAfterReboot

構成の適用中の再起動後の動作を指定します。 指定できる値は ContinueConfiguration と StopConfiguration です。

allowModuleOverwrite

boolean

true の場合、 プル サービスからダウンロードされた新しい構成は、ターゲット ノード上の古い構成を上書きできます。 それ以外の場合は false

configurationMode

configurationMode

LCM(ローカル Configuration Manager) がターゲット ノードに構成を実際に適用する方法を指定します。 使用可能な値は、ApplyOnly、ApplyAndMonitor、および ApplyAndAutoCorrect です。

configurationModeFrequencyMins

number

15

現在の構成がチェックおよび適用される頻度 (分単位) ConfigurationMode プロパティが ApplyOnly に設定されている場合、このプロパティは無視されます。 既定値は 15 です。

rebootIfNeeded

boolean

再起動を必要とする構成が適用された後にノードを自動的に再起動するには、これを true に設定します。 設定しない場合は、再起動が必要な構成のノードを手動で再起動する必要があります。 既定値は false です。 DSC 以外 (Windows インストーラーなど) で再起動の条件が有効化されている場合にこの設定を使用するには、この設定を xPendingReboot モジュールと併用します。

refreshFrequencyMins

number

30

LCM がプル サービスをチェックして最新の構成を取得する時間間隔 (分)。 この値は、LCM がプル モードで構成されていない場合は無視されます。 既定値は 30 です。

createdByType

リソースを作成した ID の種類。

名前 説明
Application

string

Key

string

ManagedIdentity

string

User

string

Error

名前 説明
code

string

エラー コード。

message

string

操作が失敗した理由を示す詳細エラー メッセージ。

ErrorResponse

操作エラーのエラー応答

名前 説明
error

Error

GuestConfigurationAssignment

ゲスト構成の割り当ては、マシンとゲスト構成の間の関連付けです。

名前 説明
id

string

ゲスト構成割り当ての ARM リソース ID。

location

string

VM が配置されているリージョン。

name

string

ゲスト構成の割り当ての名前。

properties

GuestConfigurationAssignmentProperties

ゲスト構成割り当てのプロパティ。

systemData

systemData

createdBy および modifiedBy 情報を含む Azure Resource Manager メタデータ。

type

string

リソースの型。

GuestConfigurationAssignmentProperties

ゲスト構成の割り当てプロパティ。

名前 説明
assignmentHash

string

構成パッケージとパラメーターの結合ハッシュ。

complianceStatus

complianceStatus

割り当てられたゲスト構成のマシンのコンプライアンス状態を示す値。

context

string

ゲスト構成の割り当てを開始したソース。 例: Azure Policy

guestConfiguration

GuestConfigurationNavigation

割り当てるゲスト構成。

lastComplianceStatusChecked

string

最後のコンプライアンス状態が確認された日時。

latestAssignmentReport

AssignmentReport

最後に報告されたゲスト構成の割り当てレポート。

latestReportId

string

ゲスト構成割り当ての最新のレポートの ID。

parameterHash

string

ゲスト構成割り当てのパラメーター ハッシュ。

provisioningState

provisioningState

プロビジョニング状態。これは応答にのみ表示されます。

resourceType

string

リソースの種類 - VMSS/VM

targetResourceId

string

VM リソース ID。

vmssVMList

VMSSVMInfo[]

VMSS の VM コンプライアンス データの一覧

GuestConfigurationNavigation

ゲスト構成は、DSC 構成とその依存関係をカプセル化する成果物です。 成果物は、DSC 構成 (MOF として) と依存リソース、およびモジュールなどのその他の依存関係を含む zip ファイルです。

名前 説明
assignmentSource

string

構成の配信元を指定します。

assignmentType

assignmentType

構成の割り当ての種類と実行を指定します。 使用できる値は、Audit、DeployAndAutoCorrect、ApplyAndAutoCorrect、ApplyAndMonitor です。

configurationParameter

ConfigurationParameter[]

ゲスト構成の構成パラメーター。

configurationProtectedParameter

ConfigurationParameter[]

ゲスト構成の保護された構成パラメーター。

configurationSetting

ConfigurationSetting

ゲスト構成の構成設定。

contentHash

string

ゲスト構成パッケージと構成パラメーターの結合ハッシュ。

contentType

string

構成のコンテンツ タイプを指定します。 指定できる値は Builtin または Custom です。

contentUri

string

ゲスト構成パッケージがアップロードされるストレージの URI。

kind

kind

ゲスト構成の種類。 例: DSC

name

string

ゲスト構成の名前。

version

string

ゲスト構成のバージョン。

kind

ゲスト構成の種類。 例: DSC

名前 説明
DSC

string

provisioningState

プロビジョニング状態。これは応答にのみ表示されます。

名前 説明
Canceled

string

Created

string

Failed

string

Succeeded

string

systemData

リソースの作成と最後の変更に関連するメタデータ。

名前 説明
createdAt

string

リソース作成のタイムスタンプ (UTC)。

createdBy

string

リソースを作成した ID。

createdByType

createdByType

リソースを作成した ID の種類。

lastModifiedAt

string

リソースの最終変更のタイムスタンプ (UTC)

lastModifiedBy

string

リソースを最後に変更した ID。

lastModifiedByType

createdByType

リソースを最後に変更した ID の種類。

type

レポートの種類、整合性、または初期

名前 説明
Consistency

string

Initial

string

VMInfo

VM に関する情報。

名前 説明
id

string

VM の Azure リソース ID。

uuid

string

VM の UUID (ユニバーサル一意識別子)。

VMSSVMInfo

VMSS VM に関する情報

名前 説明
complianceStatus

complianceStatus

割り当てられたゲスト構成のマシンのコンプライアンス状態を示す値。

lastComplianceChecked

string

最後のコンプライアンス状態が確認された日時。

latestReportId

string

ゲスト構成割り当ての最新のレポートの ID。

vmId

string

VM の UUID。

vmResourceId

string

VM の Azure リソース ID。