Script Executions - Create Or Update
ScriptExecution létrehozása
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}?api-version=2024-09-01
URI-paraméterek
Name | In | Kötelező | Típus | Description |
---|---|---|---|---|
private
|
path | True |
string pattern: ^[-\w\._]+$ |
A magánfelhő neve |
resource
|
path | True |
string minLength: 1maxLength: 90 |
Az erőforráscsoport neve. A név nem megkülönbözteti a kis- és nagybetűket. |
script
|
path | True |
string pattern: ^[-\w\._]+$ |
A szkript parancsmagjának neve. |
subscription
|
path | True |
string (uuid) |
A cél-előfizetés azonosítója. Az értéknek UUID-nek kell lennie. |
api-version
|
query | True |
string minLength: 1 |
A művelethez használandó API-verzió. |
Kérelem törzse
Name | Kötelező | Típus | Description |
---|---|---|---|
properties.timeout | True |
string |
Végrehajtási időkorlát |
properties.failureReason |
string |
Hibaüzenet, ha a szkript futtatható volt, de ha maga a szkript hibás volt, vagy a PowerShell kivételt jelzett |
|
properties.hiddenParameters | ScriptExecutionParameter[]: |
Az ARM számára rejtett/nem látható paraméterek, például jelszavak és hitelesítő adatok |
|
properties.namedOutputs |
object |
Felhasználó által definiált szótár. |
|
properties.output |
string[] |
Standard kimeneti stream a PowerShell-végrehajtásból |
|
properties.parameters | ScriptExecutionParameter[]: |
A szkript által elfogadott paraméterek |
|
properties.retention |
string |
Itt az idő, hogy éljünk az erőforrás számára. Ha nincs megadva, 60 napig lesz elérhető |
|
properties.scriptCmdletId |
string |
Hivatkozás a szkript parancsmag-erőforrására, ha a felhasználó AVS-szkriptet futtat |
Válaszok
Name | Típus | Description |
---|---|---|
200 OK |
A ScriptExecution erőforrás frissítési művelete sikeres volt |
|
201 Created |
A ScriptExecution erőforrás létrehozási művelete sikeres volt Fejlécek Retry-After: integer |
|
Other Status Codes |
Váratlan hibaválasz. |
Biztonság
azure_auth
Azure Active Directory OAuth2 Flow.
Típus:
oauth2
Folyamat:
implicit
Engedélyezési URL:
https://login.microsoftonline.com/common/oauth2/authorize
Hatókörök
Name | Description |
---|---|
user_impersonation | a felhasználói fiók megszemélyesítése |
Példák
ScriptExecutions_CreateOrUpdate
Mintakérelem
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptExecutions/addSsoServer?api-version=2024-09-01
{
"properties": {
"scriptCmdletId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource",
"timeout": "P0Y0M0DT0H60M60S",
"retention": "P0Y0M60DT0H60M60S",
"parameters": [
{
"name": "DomainName",
"type": "Value",
"value": "placeholderDomain.local"
},
{
"name": "BaseUserDN",
"type": "Value",
"value": "DC=placeholder, DC=placeholder"
}
],
"hiddenParameters": [
{
"name": "Password",
"type": "SecureValue",
"secureValue": "PlaceholderPassword"
}
]
}
}
Mintaválasz
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptExecutions/addSsoServer",
"name": "addSsoServer",
"properties": {
"scriptCmdletId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource",
"timeout": "P0Y0M0DT0H60M60S",
"retention": "P0Y0M60DT0H60M60S",
"provisioningState": "Succeeded",
"failureReason": "vCenter failed to connect to the external server",
"parameters": [
{
"name": "DomainName",
"type": "Value",
"value": "placeholderDomain.local"
},
{
"name": "BaseUserDN",
"type": "Value",
"value": "DC=placeholder, DC=placeholder"
}
],
"output": [
"IdentitySource: placeholder.dc",
"BaseDN='dc=placeholder, dc=local"
]
},
"type": "Microsoft.AVS/privateClouds/scriptExecutions"
}
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptExecutions/addSsoServer",
"name": "addSsoServer",
"properties": {
"scriptCmdletId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource",
"timeout": "P0Y0M0DT0H60M60S",
"retention": "P0Y0M60DT0H60M60S",
"provisioningState": "Running",
"parameters": [
{
"name": "DomainName",
"type": "Value",
"value": "placeholderDomain.local"
},
{
"name": "BaseUserDN",
"type": "Value",
"value": "DC=placeholder, DC=placeholder"
}
]
},
"type": "Microsoft.AVS/privateClouds/scriptExecutions"
}
Definíciók
Name | Description |
---|---|
created |
Az erőforrást létrehozó identitás típusa. |
Error |
Az erőforrás-kezelési hiba további információi. |
Error |
A hiba részletei. |
Error |
Hibaválasz |
PSCredential |
PowerShell hitelesítőadat-objektum |
Script |
Egy felhasználó által végrehajtott szkript példánya – egyéni vagy AVS |
Script |
szkriptvégrehajtási paraméter típusa |
Script |
Szkriptvégrehajtás kiépítési állapota |
Script |
egyszerű szöveges érték végrehajtási paramétere |
Script |
egyszerű szöveges érték végrehajtási paramétere |
system |
Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok. |
createdByType
Az erőforrást létrehozó identitás típusa.
Érték | Description |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
ErrorAdditionalInfo
Az erőforrás-kezelési hiba további információi.
Name | Típus | Description |
---|---|---|
info |
object |
A további információk. |
type |
string |
A további információtípus. |
ErrorDetail
A hiba részletei.
Name | Típus | Description |
---|---|---|
additionalInfo |
A hiba további információi. |
|
code |
string |
A hibakód. |
details |
A hiba részletei. |
|
message |
string |
A hibaüzenet. |
target |
string |
A hibacél. |
ErrorResponse
Hibaválasz
Name | Típus | Description |
---|---|---|
error |
A hibaobjektum. |
PSCredentialExecutionParameter
PowerShell hitelesítőadat-objektum
Name | Típus | Description |
---|---|---|
name |
string |
A paraméter neve |
password |
string (password) |
jelszó a bejelentkezéshez |
type |
string:
Credential |
szkriptvégrehajtási paraméter típusa |
username |
string |
felhasználónév a bejelentkezéshez |
ScriptExecution
Egy felhasználó által végrehajtott szkript példánya – egyéni vagy AVS
Name | Típus | Description |
---|---|---|
id |
string (arm-id) |
Az erőforrás teljes erőforrás-azonosítója. Például: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name |
string |
Az erőforrás neve |
properties.errors |
string[] |
Standard hibakimeneti stream a PowerShell-végrehajtásból |
properties.failureReason |
string |
Hibaüzenet, ha a szkript futtatható volt, de ha maga a szkript hibás volt, vagy a PowerShell kivételt jelzett |
properties.finishedAt |
string (date-time) |
A szkript végrehajtásának befejezése |
properties.hiddenParameters | ScriptExecutionParameter[]: |
Az ARM számára rejtett/nem látható paraméterek, például jelszavak és hitelesítő adatok |
properties.information |
string[] |
Standard információ a PowerShell-végrehajtásból származó streamből |
properties.namedOutputs |
object |
Felhasználó által definiált szótár. |
properties.output |
string[] |
Standard kimeneti stream a PowerShell-végrehajtásból |
properties.parameters | ScriptExecutionParameter[]: |
A szkript által elfogadott paraméterek |
properties.provisioningState |
A szkriptvégrehajtási erőforrás állapota |
|
properties.retention |
string |
Itt az idő, hogy éljünk az erőforrás számára. Ha nincs megadva, 60 napig lesz elérhető |
properties.scriptCmdletId |
string |
Hivatkozás a szkript parancsmag-erőforrására, ha a felhasználó AVS-szkriptet futtat |
properties.startedAt |
string (date-time) |
A szkript végrehajtásának elindítása |
properties.submittedAt |
string (date-time) |
A szkript végrehajtásának elküldése |
properties.timeout |
string |
Végrehajtási időkorlát |
properties.warnings |
string[] |
Szabványos figyelmeztetés a powershell-végrehajtásból származó streamről |
systemData |
A createdBy és a modifiedBy adatokat tartalmazó Azure Resource Manager-metaadatok. |
|
type |
string |
Az erőforrás típusa. Pl. "Microsoft.Compute/virtualMachines" vagy "Microsoft.Storage/storageAccounts" |
ScriptExecutionParameterType
szkriptvégrehajtási paraméter típusa
Érték | Description |
---|---|
Credential | |
SecureValue | |
Value |
ScriptExecutionProvisioningState
Szkriptvégrehajtás kiépítési állapota
Érték | Description |
---|---|
Canceled |
Az erőforrás létrehozása megszakadt. |
Cancelled |
törölve van |
Cancelling |
megszakítja |
Deleting |
törlés |
Failed |
Az erőforrás létrehozása nem sikerült. |
Pending |
függőben van |
Running |
fut |
Succeeded |
Az erőforrás létrejött. |
ScriptSecureStringExecutionParameter
egyszerű szöveges érték végrehajtási paramétere
Name | Típus | Description |
---|---|---|
name |
string |
A paraméter neve |
secureValue |
string (password) |
Az átadott paraméter biztonságos értéke, amely nem tárolható naplókban |
type |
string:
Secure |
szkriptvégrehajtási paraméter típusa |
ScriptStringExecutionParameter
egyszerű szöveges érték végrehajtási paramétere
Name | Típus | Description |
---|---|---|
name |
string |
A paraméter neve |
type |
string:
Value |
szkriptvégrehajtási paraméter típusa |
value |
string |
Az átadott paraméter értéke |
systemData
Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok.
Name | Típus | Description |
---|---|---|
createdAt |
string (date-time) |
Az erőforrás-létrehozás időbélyege (UTC). |
createdBy |
string |
Az erőforrást létrehozó identitás. |
createdByType |
Az erőforrást létrehozó identitás típusa. |
|
lastModifiedAt |
string (date-time) |
Az erőforrás utolsó módosításának időbélyege (UTC) |
lastModifiedBy |
string |
Az erőforrást legutóbb módosító identitás. |
lastModifiedByType |
Az erőforrást legutóbb módosító identitás típusa. |